Skip to content

Instantly share code, notes, and snippets.

@jzheaux
Created April 28, 2015 23:58
Show Gist options
  • Save jzheaux/1a05d2c4ab42abbbd1b1 to your computer and use it in GitHub Desktop.
Save jzheaux/1a05d2c4ab42abbbd1b1 to your computer and use it in GitHub Desktop.
var express = require('express');
var bodyParser = require('body-parser')
var app = express();
app.use(bodyParser.urlencoded({ // to support URL-encoded bodies
extended: true
}))
app.get('/', function (req, res) {
res.send('Hello World!');
});
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://%s:%s', host, port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment