Created
August 1, 2021 19:33
-
-
Save pramodmg/896371ee17fb6221c53ec5c9d93d8028 to your computer and use it in GitHub Desktop.
Setting up the express web server - simplest way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "express-web-server", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "node simpleRoute.js" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"express": "^4.17.1" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
let app = express(); | |
const port = 3009; | |
app.listen(port, () => console.log(`listening on ${port}`)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment