-
-
Save Rottie/0e4afb0f64d51d4061e03d3c8e481bdf to your computer and use it in GitHub Desktop.
Boilerplate code Node Server Setup
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
// 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