Skip to content

Instantly share code, notes, and snippets.

@andrewdavidcostello
Created August 1, 2017 10:36
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 andrewdavidcostello/5283241b1aa568f176ccabbc85d3efe5 to your computer and use it in GitHub Desktop.
Save andrewdavidcostello/5283241b1aa568f176ccabbc85d3efe5 to your computer and use it in GitHub Desktop.
Express Hello World
var express = require('express'),
app = express(),
port = process.env.PORT || 3000;
var listener = app.listen(port, () => {
console.info("==> ✅ Server is listening");
console.info("==> 🌎 Go to localhost:%s", port);
});
app.route('/')
.get((req, res) => {
res.send('Hello World!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment