Skip to content

Commit

Permalink
Print the port being used when starting script/server
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jan 10, 2016
1 parent 1df6235 commit 667995f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script/server
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ var types = {
txt: 'text/plain'
};

http.createServer(function(req, res) {
server = http.createServer(function(req, res) {
var pathname = url.parse(req.url).pathname;
var route = routes[pathname];
if (route) {
Expand All @@ -140,4 +140,8 @@ http.createServer(function(req, res) {
}
});
}
}).listen(port);
});

console.warn("Started test server on localhost:" + port);
server.listen(port);

0 comments on commit 667995f

Please sign in to comment.