Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
Fixed current working directory specification
Browse files Browse the repository at this point in the history
  • Loading branch information
jakerella committed Sep 14, 2013
1 parent 35750d4 commit 7a36625
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions simpleServer.js
Expand Up @@ -6,7 +6,7 @@ var http = require("http"),
fs = require("fs"),
mime = require("mime"),
proxyPort = 9000,
rootDir = process.argv[2] || __dirname,
rootDir = process.argv[2] || process.cwd(),
host = process.argv[3] || "localhost",
port = process.argv[4] || 8686;

Expand Down Expand Up @@ -47,4 +47,8 @@ http.createServer(function(request, response) {
});
}).listen(proxyPort);

console.log("Static file server running at => " + (host + ":" + port).green.bold + "\nCTRL + C to shutdown".yellow.bold);
console.log(
"Static file server running at => " + (host + ":" + port).green.bold +
"\n serving files from " + rootDir +
"\nCTRL + C to shutdown".yellow.bold
);

0 comments on commit 7a36625

Please sign in to comment.