- jwt
- express js
- node js
- mysql
- api-app/routes/db.js
- cd token-generator-app
- npm start
- cd api-app
- npm start
-
to login make a request to this endpoint "POST localhost:4000/login" at any restclient, Don't forget to add this json at body>json, { "username": "juboraj", "password": "naofel" }
-
after the request entered, you should get an accesstoken at response body
-
copy that access token
- make a request to this endpoint "GET localhost:3000/users" to see users data
- make a request to this endpoint "POST localhost:3000/users" to add a user where, body>json: { "fname": "SampleFirstname", "lname": "Sample LastName", "cgpa": 4.00 }
auth> bearer: the token you have copied will be pasted