secret-server hides your application behind a password
MIT License
Secret-server hides your application behind a password
This module will make the application unaccessible until the user enters the correct password
This module was done with the intent to be used during development stages of an application, in order to be able to demo it to the client but keeping hidden from outsiders.
npm i secret-server
import secretServer from 'secret-server'
expressApp.use(cookieSession({
name: 'session',
keys: ['key1', 'key2'],
})) // or any other session (express-session for example)
expressApp.use(secretServer(/* configuration object */{
password: 'test',
redirect: '/',
successRedirect: '/success',
})) // this should be done before setting the routes
Please check the tests folder for a more complete working example
All properties are not required
Property | description | default |
---|---|---|
password | password to be used | test |
successRedirect | path to redirect the user after a successful authorization | undefined |
redirect | path to redirect the user when not authorized | undefined |
file | path to the html file with the user input for authorization | undefined |
MIT