simple user account registering and login app using nodejs, expressjs and mongodb using jsonwebtoken for authentication.
- npm latest version
- REST Client Extension for Visual Studio (for checking api end points)
- Nodejs
- ExpressJs
- MongoDb
- Rest Client
npm install --save
Dependencies are:
express, bcrypt, cors, jsonwebtoken, mongoose, dotenv, cookie-parser
npm install --save-dev
Dev Dependency is:
nodemon
npm run devStart
Or
nodemon app.js
POST http://localhost:4000/api/create-user
Content-Type: application/json
{
"fullName": "Abraham Mitiku",
"email": "abraham@gmail.com",
"password": "123"
}
POST http://localhost:4000/api/create-user
Content-Type: application/json
{
"email": "abraham@gmail.com",
"password": "123"
}
GET http://localhost:4000/api/read-user-info
You can add authorized resource end points