A basic authentication service built with:
- Define environment variables to be used in the configuration file (config.js)
module.exports = {
email: process.env.EMAIL || false,
mongo: process.env.MONGO_URL,
port: process.env.PORT || 5800,
sendMail: {
from: '',
subject: ''
}
};
- If email is enabled, it is assumed that smpt is listening on port 25
- path /login
- method POST
- data {username: [username], password: [password]}
- path /logout
- method POST
- data {username: [username]}
- path /register
- method POST
- data {username: [username], password: [password]}
- path /reset
- method POST
- data {username: [username]}