Skip to content

Ariel-55/RestServer-Typescrit-Nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test the rest server that is hosted in HEROKU

https://rest-server-typescript.herokuapp.com/login Create POST request, send this JSON { "email": "[email protected]", "password": 123 }

Installation

  1. Node js and npm (check installations with node -v and npm -v)
  2. Execute "npm install -g typescript" to isntall typescrit (check installation with tsc -v)

Commands to execute the project

  1. Execute "npm install" (to instal node_modules)
  2. Execute "tsc" (to comile the typescript code to Java scrit)
  3. Execute "npm start" (to run the project)

Login

  1. Create a POST request , send this json

{ "email": "[email protected]", "password": 123 }

the url is: http://localhost:3000/login and the port is 3000

  1. Get the response, you will get a token (copy the token)
  2. create a GET request and use this url http://localhost:3000/data
  3. create the header called "x-token" and give the value of the token
  4. send the request and see the results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published