Restful API implementation with NodeJS, Express and JsonWebToken, to demonstrate how JWT token secure restful API endpoint.
http://localhost:3002/profile, this endpoint return input json object to get JWT token via below post request.
http://localhost:3002/profile/login : This endpoing accept body in below format and returns the JWT token to access secure endpoint. {"fullname":"Test User","email":"test@domain.com"}
http://localhost:3002/profile : This endpoint can only be accessed by valid JWT token generated by above(/profile/login) endpoint.