Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from dilvie/master

PORT environment setting
  • Loading branch information...
commit e77b830aefeb3083933e9dd6c39cfb3717fd9b01 2 parents 751a7b2 + 6bc1758
@spadin authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 server.js
View
5 server.js
@@ -1,5 +1,6 @@
var express = require("express"),
- app = express.createServer();
+ app = express(),
+ port = parseInt(process.env.PORT, 10) || 4567;
app.get("/", function(req, res) {
res.redirect("/index.html");
@@ -16,4 +17,4 @@ app.configure(function(){
app.use(app.router);
});
-app.listen(4567);
+app.listen(port);
Please sign in to comment.
Something went wrong with that request. Please try again.