Skip to content

Commit

Permalink
Command Line options
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBeale committed May 5, 2015
1 parent 4f04f7e commit 1a69b8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/s3rver.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ program.version(version, '--version');
program.option('-h, --hostname [value]', 'Set the host name or ip for the server', 'localhost')
.option('-p, --port <n>', 'Set the port of the http server', 4568)
.option('-s, --silent', 'Suppress log messages', false)
.option('-i, --indexDocumement', 'Index Document for Static Web Hosting', '')
.option('-e, --errorDocument', 'Custom Error Document for Static Web Hosting', '')
.option('-d, --directory [path]', 'Data directory')
.parse(process.argv);

Expand All @@ -34,6 +36,8 @@ s3rver.setHostname(program.hostname)
.setPort(program.port)
.setDirectory(program.directory)
.setSilent(program.silent)
.setIndexDocument(program.indexDocumement)
.setErrorDocument(program.errorDocument)
.run(function (err, host, port) {
console.log('now listening on host %s and port %d', host, port);
});

0 comments on commit 1a69b8e

Please sign in to comment.