Last active
January 8, 2019 15:37
-
-
Save maishsk/e78fa2924ea612a8fa4b83c6f3b82aef to your computer and use it in GitHub Desktop.
simple webserver
This file contains 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') | |
const app = express() | |
const port = 3000 | |
app.get('/hello', (request, response) => { | |
response.send('Hello from Express!') | |
}) | |
app.listen(port, (err) => { | |
if (err) { | |
return console.log('something bad happened', err) | |
} | |
console.log(`server is listening on ${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment