This backend use authentication with access tokens using JWT. Besides, use Refresh Tokens for refresh the access tokens. All tokens are stored via httpOnly cookies.
This project use npm for packet management. For install al dependencies run in a terminal
npm install
Copy .env.example
to .env
and modify the variables.
MONGO_URI= # URI for mongo connect. Ex. mongodb://localhost:27017/database
JWT_SECRET= # String used for sign JWT tokens. This must be a strong string
COOKIE_SECRET= # String used for sign cookies. This must be a strong string
PORT= # Port number to listen on. Ex. 3000
For start the project in developer mode you can run in a terminal
npm run dev
For production mode run
npm start
This project use Apache License V2