A simple jwt authentication with express
- Install all project dependencies with
npm install
- Start the server with
npm start
- Or start the server in watch mode with
npm run start:dev
- Download mongodb
- Start it with
mongod
- If it does not work, check the instalation guide
- Start the project with
npm start
- Open constants files at
/src/constants/index
- Change MONGO_URL to your mongo server address
- Start the project with
npm start
- This project uses eslint with custom airbnb base config as a lint tool, to start lint run
npm run lint
- This project uses Commitizen git convention, to commit with right conventions run
npm run commit
- This project uses a concise timeline, all code pushed to master should be rebased
POST: /api/account/singup
Body
{
name: String,
email: String,
password: String,
phone: [
{
number: Number,
prefix: Number,
},
],
}
POST: /api/account/token
Body
{
email: String,
password: String
}
GET: /api/account/me
Header
Authorization: Bearer <Token>