Skip to content

Instantly share code, notes, and snippets.

@cassanellicarlo
Created November 10, 2020 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cassanellicarlo/061c5bed351e2ae31b5f02ec80a246c7 to your computer and use it in GitHub Desktop.
Save cassanellicarlo/061c5bed351e2ae31b5f02ec80a246c7 to your computer and use it in GitHub Desktop.
Node.js Express Hello World
'use strict';
const express = require('express');
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
// App
const app = express();
app.get('/', (req, res) => {
res.send('Hello World');
});
app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment