Skip to content

Instantly share code, notes, and snippets.

@srkiNZ84
Created May 3, 2021 11:25
Show Gist options
  • Save srkiNZ84/2839b8ff2c41fd4938157fe3efa19c1e to your computer and use it in GitHub Desktop.
Save srkiNZ84/2839b8ff2c41fd4938157fe3efa19c1e to your computer and use it in GitHub Desktop.
NodeJS HelloWorld
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