Skip to content

Instantly share code, notes, and snippets.

@cassanellicarlo
Created November 10, 2020 13:47
Show Gist options
  • 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