Install package nodemon
.
$ npm install -g nodemon
- Config
PORT
,DB_URI
in.env
file. - Config email in
./app/routes/authentication.js
file.
Run this command.
$ nodemon server.js
Note: For APIs that require account authentication, you must add Headers Authorization: "JWT <token_string>"
API | Authorization | Method | Params |
---|---|---|---|
/authentication/sign_in |
NO | POST | email , password |
/authentication/register |
NO | POST | email , password , name , avatar |
/authentication/forgot |
NO | POST | email |
/authentication/reset/<session> |
NO | POST | newPassword , confirmPassword |
/user/info |
YES | GET | id |
/user/info |
YES | PATCH | id , name , avatar , old_password , new_password |
/card/create |
YES | POST | id , type , balance , name , exp , number , cvv |
/cards |
YES | GET | id |
/card/edit |
YES | PATCH | id , id_user , type , balance , name , exp , number , cvv |
/card/delete |
YES | DELETE | id_user , id |
/record/create |
YES | POST | id , datetime , category , card , value |
/records |
YES | GET | id |
/records/<mode>/<category> |
YES | GET | id |
/record/delete |
YES | DELETE | id |
/record/edit |
YES | PATCH | id , datetime , category , card , value |
/note/create |
YES | POST | id , title , content |
/notes |
YES | GET | id |
/note/delete |
YES | DELETE | id |
/note/edit |
YES | PATCH | id , title , content |