Skip to content

vmdeom/auth-system-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auth_system_node

About

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.


Dependencies

express;
body-parser;
dotenv;
cookie-parser;
bcrypt;

Setup

Using npm:

$ npm init -y

Create .env file using GitBash:

$ touch .env
PORT = 3000 
IP = '127.0.0.1'

Routes

//GET Routes
'/';
'/register';
'/login';

//POST Routes
'/auth/register';
'/auth/login';

Register Body

{
    "name": "username",
    "email": "email",
    "password": "password",
    "password_confirm": "password"
}

Login Body

{
    "email": "email",
    "password": "password",
}

About

Simple CRUD and authentication with Node.js

Resources

Stars

Watchers

Forks