use original variable name
This commit is contained in:
parent
2362137667
commit
b87a256e20
1 changed files with 9 additions and 9 deletions
18
src/main.js
18
src/main.js
|
@ -70,25 +70,25 @@ program
|
||||||
'-v, --version',
|
'-v, --version',
|
||||||
);
|
);
|
||||||
program.parse(process.argv);
|
program.parse(process.argv);
|
||||||
const options = program.opts();
|
const opts = program.opts();
|
||||||
|
|
||||||
console.log(`Starting ${packageJson.name} v${packageJson.version}`);
|
console.log(`Starting ${packageJson.name} v${packageJson.version}`);
|
||||||
|
|
||||||
const startServer = (configPath, config) => {
|
const startServer = (configPath, config) => {
|
||||||
let publicUrl = options.public_url;
|
let publicUrl = opts.public_url;
|
||||||
if (publicUrl && publicUrl.lastIndexOf('/') !== publicUrl.length - 1) {
|
if (publicUrl && publicUrl.lastIndexOf('/') !== publicUrl.length - 1) {
|
||||||
publicUrl += '/';
|
publicUrl += '/';
|
||||||
}
|
}
|
||||||
return require('./server')({
|
return require('./server')({
|
||||||
configPath: configPath,
|
configPath: configPath,
|
||||||
config: config,
|
config: config,
|
||||||
bind: options.bind,
|
bind: opts.bind,
|
||||||
port: options.port,
|
port: opts.port,
|
||||||
cors: options.cors,
|
cors: opts.cors,
|
||||||
verbose: options.verbose,
|
verbose: opts.verbose,
|
||||||
silent: options.silent,
|
silent: opts.silent,
|
||||||
logFile: options.log_file,
|
logFile: opts.log_file,
|
||||||
logFormat: options.log_format,
|
logFormat: opts.log_format,
|
||||||
publicUrl: publicUrl
|
publicUrl: publicUrl
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue