Creating Basic Rest API using Node JS

  • Generality interfaces
  • Reduce latency and thus improve performance
  • Scalability of interactions between components
  • Reliable

Part A

  1. Download Node JS from this link. Install the package, with package at least 14.17 (current as of today)
  2. Create a folder name “testapi” in your command prompt
  1. We will need the following libraries for this project
  • ExpressJS. Express JS is a flexible and light framework for developing web and mobile APIs
  1. Create the following files under testapi/
  • server.js

Part B

  • Get
  • Post
  • Put
  • Head
  • Delete
  • Patch
  • Options

Part C

  1. Open up the file server.js under testapi/ folder using Visual Studio Code
app.get ("/", (request,response)=>{
response.send ("This is my first GET method!")
}) ('/testpost', (request,response)=>{
response.send ("Message by you : " + message)

Part E



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I am a Software Engineer. Follow me on Linkedin at