Skip to content

Instantly share code, notes, and snippets.

@Rottie

Rottie/app.js Secret

Created November 7, 2021 11:04
Show Gist options
  • Save Rottie/0e4afb0f64d51d4061e03d3c8e481bdf to your computer and use it in GitHub Desktop.
Save Rottie/0e4afb0f64d51d4061e03d3c8e481bdf to your computer and use it in GitHub Desktop.
Boilerplate code Node Server Setup
// require packages used in the project
const express = require('express')
const app = express()
const port = 3000
// routes setting
app.get('/', (req, res) => {
res.send('Hello World')
})
// start and listen on the Express server
app.listen(port, () => {
console.log(`Express is listening on localhost:${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment