Skip to content

Instantly share code, notes, and snippets.

@sudipt1999
Created June 1, 2020 15:11
Show Gist options
  • Save sudipt1999/30e1bf3694e3afee59605cd67f19b2b9 to your computer and use it in GitHub Desktop.
Save sudipt1999/30e1bf3694e3afee59605cd67f19b2b9 to your computer and use it in GitHub Desktop.
const express = require('express')
const bodyParser = require('body-parser')
const data = require('./data')
const app = express()
// Will allow data from ajax in req.body variable
app.use(bodyParser.json())
// Will allow form data in req.body variable
app.use(bodyParser.urlencoded({ extended: false }))
// making our server run on PORT 5000
app.listen(5000, ()=>{
console.log("APP STARTED AT PORT 5000")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment