Skip to content

Instantly share code, notes, and snippets.

@timbergus
Created October 24, 2013 07:01
Show Gist options
  • Save timbergus/7132550 to your computer and use it in GitHub Desktop.
Save timbergus/7132550 to your computer and use it in GitHub Desktop.
Basic Node.js server with Express.
var express = require("express");
var app = express();
app.use(express.logger());
app.get('/', function(request, response)
{
response.send('Hello World!');
});
var port = process.env.PORT || 5000;
app.listen(port, function()
{
console.log("Listening on " + port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment