diff --git a/src/main.js b/src/main.js index c0162cf..b643164 100644 --- a/src/main.js +++ b/src/main.js @@ -21,58 +21,59 @@ if (args.length >= 3 && args[2][0] !== '-') { import {program} from 'commander'; program - .description('tileserver-gl startup options') - .usage('tileserver-gl [mbtiles] [options]') - .option( - '--mbtiles ', - 'MBTiles file (uses demo configuration);\n' + + .description('tileserver-gl startup options') + .usage('tileserver-gl [mbtiles] [options]') + .option( + '--mbtiles ', + 'MBTiles file (uses demo configuration);\n' + '\t ignored if the configuration file is also specified' - ) - .option( - '-c, --config ', - 'Configuration file [config.json]', - 'config.json' - ) - .option( - '-b, --bind
', - 'Bind address' - ) - .option( - '-p, --port ', - 'Port [8080]', - 8080, - parseInt - ) - .option( - '-C|--no-cors', - 'Disable Cross-origin resource sharing headers' - ) - .option( - '-u|--public_url ', - 'Enable exposing the server on subpaths, not necessarily the root of the domain' - ) - .option( - '-V, --verbose', - 'More verbose output' - ) - .option( - '-s, --silent', - 'Less verbose output' - ) - .option( - '-l|--log_file ', - 'output log file (defaults to standard out)' - ) - .option( - '-f|--log_format ', - 'define the log format: https://github.com/expressjs/morgan#morganformat-options' - ) - .version( - packageJson.version, - '-v, --version' - ); + ) + .option( + '-c, --config ', + 'Configuration file [config.json]', + 'config.json' + ) + .option( + '-b, --bind
', + 'Bind address' + ) + .option( + '-p, --port ', + 'Port [8080]', + 8080, + parseInt + ) + .option( + '-C|--no-cors', + 'Disable Cross-origin resource sharing headers' + ) + .option( + '-u|--public_url ', + 'Enable exposing the server on subpaths, not necessarily the root of the domain' + ) + .option( + '-V, --verbose', + 'More verbose output' + ) + .option( + '-s, --silent', + 'Less verbose output' + ) + .option( + '-l|--log_file ', + 'output log file (defaults to standard out)' + ) + .option( + '-f|--log_format ', + 'define the log format: https://github.com/expressjs/morgan#morganformat-options' + ) + .version( + packageJson.version, + '-v, --version' + ) program.parse(process.argv); const opts = program.opts(); + console.log(`Starting ${packageJson.name} v${packageJson.version}`); const startServer = (configPath, config) => {