$ npm install
$ cd api
$ npm run server
-
Type: POST
-
Request:
{ "name": "thanh", "email": "[email protected]", "password": "thanh123" }
-
Respone:
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": "5f75eec6819376603e1874a5", "name": "thanh", "email": "[email protected]" } }
-
Type: POST
-
Request:
{ "email": "[email protected]", "password": "thanh123" }
-
Respone:
{ "msg": "Login successfully", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....", "user": { "id": "5f75eec6819376603e1874a5", "name": "thanh", "email": "[email protected]" } }