errsole_first_task

This is a simple hello world express app

Stars
0
Committers
2

Errsole First Task

A simple express app with get /hello api upon surfing returns a json object containing "hello world!" message and status 200.

Installation

  1. Clone the repository:
  git clone https://github.com/YadamVinay369/errsole_first_task.git

  1. Navigate to the project directory:
  cd errsole_first_task
  1. Open the project in a code editor (e.g., VS Code):
  code .
  1. open terminal in the vscode and type
  npm i express nodemon 

Usage Instructions

Start the server by entering the command below into the vscode terminal.

npm run server

Note

In the package.json file, I have added explicitly

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "server": "nodemon server.js"
    
  },

Now to run the server, we can simply use the command

npm run server

instead of

nodemon server.js

API usage

After starting the server, open any browser and surf the below API.

http://localhost:5000/hello

Authors