private-static-website
Easily host a private web site authenticated by email address only
Last updated 6 years ago by tehshrike .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install private-static-website 
SYNC missed versions from official npm registry.

Serves up the content of a local directory to everyone who logs in with an allowed email address.

Usage

var makePrivateServer = require('private-static-website')

var options = {

}

var server = makePrivateServer(options)

server.start(8080)

server.updateUsers([
	'you@yourdomain.com',
	'yourfriend@gmail.com'
])

Options

  • privateContentPath: the local path with the content to be served to authenticated users
  • transportOptions: transport options to be passed to nodemailer
  • defaultMailOptions: default values for the "e-mail message fields" to be passed to nodemailer
  • getEmailText: a function that takes a login token and returns a string of html to be sent as the login email
  • domain: the domain name that cookies should be set on
  • db (optional): if you would like user's sessions to be persisted, you may pass in a levelup database for them to be stored in

Primarily composed of

  • just-login for email address authentication
  • st for static file serving

Todo

  • logging out
  • turn caching back on

Current Tags

  • 1.4.0                                ...           latest (4 years ago)

12 Versions

  • 1.4.0                                ...           4 years ago
  • 1.3.3                                ...           4 years ago
  • 1.3.2                                ...           4 years ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (16)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |