Created
May 3, 2021 11:25
-
-
Save srkiNZ84/2839b8ff2c41fd4938157fe3efa19c1e to your computer and use it in GitHub Desktop.
NodeJS HelloWorld
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 | |
const NAME = process.env.NAME || "World" | |
app.get('/', (req, res) => { | |
res.send('Hello ' + NAME + '!') | |
}) | |
app.listen(port, () => { | |
console.log(`Example app listening at http://localhost:${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment