-
npm install
-
create MongoDB
-
create .env file as below
PORT=80
JWT_KEY=somethingcomplicated
MONGODB_URL=
npm run lint
raw + JSON
{
"name":"William",
"email":"haoyang324@gmail.com",
"password":"testpass"
}
POST http://localhost/users/login
raw + JSON
{
"email":"haoyang324@gmail.com",
"password":"testpass"
}
Authorization -> Bearer Token
Authorization -> Bearer Token
POST http://localhost/users/me/logout
Authorization -> Bearer Token