[Startup] Stop using -h for aliasing --host (#2544)

This solves #2543 and includes documentation for the --host flag in the
help dialog.
This commit is contained in:
Javier Revillas
2019-11-20 00:06:41 +01:00
committed by Andrew Henry
parent 14e8c7a401
commit 3f6f893e29

3
app.js
View File

@ -19,7 +19,7 @@
// Defaults // Defaults
options.port = options.port || options.p || 8080; options.port = options.port || options.p || 8080;
options.host = options.host || options.h || 'localhost' options.host = options.host || 'localhost'
options.directory = options.directory || options.D || '.'; options.directory = options.directory || options.D || '.';
['include', 'exclude', 'i', 'x'].forEach(function (opt) { ['include', 'exclude', 'i', 'x'].forEach(function (opt) {
options[opt] = options[opt] || []; options[opt] = options[opt] || [];
@ -36,6 +36,7 @@
console.log("Options:"); console.log("Options:");
console.log(" --help, -h Show this message."); console.log(" --help, -h Show this message.");
console.log(" --port, -p <number> Specify port."); console.log(" --port, -p <number> Specify port.");
console.log(" --host <host> Specify host to listen on.");
console.log(" --include, -i <bundle> Include the specified bundle."); console.log(" --include, -i <bundle> Include the specified bundle.");
console.log(" --exclude, -x <bundle> Exclude the specified bundle."); console.log(" --exclude, -x <bundle> Exclude the specified bundle.");
console.log(" --directory, -D <bundle> Serve files from specified directory."); console.log(" --directory, -D <bundle> Serve files from specified directory.");