- Nodejs
- ExpressJs
- MongoDb
npm install --save
Dependencies are:
express, bcryptjs, helmet, cors, jsonwebtoken, mongoose, dotenv, cookie-parser, passport, passport-jwt, nodemailer
npm install --save-dev
Dev Dependency is:
nodemon
npm run devStart
Or
nodemon server.js
PORT=?
DATABASE_URI=?
SECRET_KEY=?
SITE_HOST=?
POST http://localhost:4000/api/signup
Content-Type: application/json
{
"name": "your name",
"email": "your email",
"password": "your password"
}
POST http://localhost:4000/api/login
Content-Type: application/json
{
"email": "your email",
"password": "your password"
}
GET http://localhost:4000/api/read-profile
Content-Type: application/json
Authorization: Bearer <access-token>
POST http://localhost:4000/api/update-profile
Content-Type: application/json
Authorization: Bearer <access-token>
{
"name": "your name"
"email": "your email"
}
POST http://localhost:4000/api/users/confirm/:id
Content-Type: application/json
POST http://localhost:4000/api/auth/refresh-token/:token
Content-Type: application/json
{
"token": "your refresh-token"
}
PUT http://localhost:4000/api/auth/renew-access-token/:token
Content-Type: application/json
{
"refreshToken": "your refresh-token"
}