https://rest-server-typescript.herokuapp.com/login Create POST request, send this JSON { "email": "[email protected]", "password": 123 }
- Node js and npm (check installations with node -v and npm -v)
- Execute "npm install -g typescript" to isntall typescrit (check installation with tsc -v)
- Execute "npm install" (to instal node_modules)
- Execute "tsc" (to comile the typescript code to Java scrit)
- Execute "npm start" (to run the project)
- Create a POST request , send this json
{ "email": "[email protected]", "password": 123 }
the url is: http://localhost:3000/login and the port is 3000
- Get the response, you will get a token (copy the token)
- create a GET request and use this url http://localhost:3000/data
- create the header called "x-token" and give the value of the token
- send the request and see the results