Skip to content

francisedulab/helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Hello world api

How to use

  • Clone the project
  • change directory and npm install
  • Add the following code in index.js file
const express = require('express')                // Importing express
const app = express()                             // Creating app isntance of express 

app.get('/', function (req, res) {                // Using GET method
  res.send('Hello World')
})

app.post('/',function(req,res){                   // Using Post method
  res.send('post called !!!!')
})

app.listen(3000)                                  // Server Listening on Port 3000

About

First step towards learning node js server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published