A simple CRUD authentication system using Node.js.
It uses bcrypt to encrypt the password and store it in a database.
Cookie-parser is for keep the session alive.
express;
body-parser;
dotenv;
cookie-parser;
bcrypt;
Using npm:
$ npm init -y
Create .env file using GitBash:
$ touch .env
PORT = 3000
IP = '127.0.0.1'
//GET Routes
'/';
'/register';
'/login';
//POST Routes
'/auth/register';
'/auth/login';
{
"name": "username",
"email": "email",
"password": "password",
"password_confirm": "password"
}
{
"email": "email",
"password": "password",
}