Fix port argument parsing
This commit is contained in:
parent
be1c243017
commit
20177fe547
3 changed files with 1968 additions and 4 deletions
|
@ -12,12 +12,10 @@ class WingbaseServer extends ServerInterface {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
let port = process.env.PORT || 8080;
|
||||
|
||||
commander
|
||||
.version(packageJson.version)
|
||||
.option('-d, --development', 'run in development mode')
|
||||
.option('-p, --port <port>', 'specify port to use', parseInt, port)
|
||||
.option('-p, --port <port>', 'specify port to use', (value) => parseInt(value), process.env.PORT ?? 8080)
|
||||
.parse(process.argv);
|
||||
|
||||
this.args = commander;
|
||||
|
|
|
@ -43,7 +43,7 @@ class ServerInterface {
|
|||
}
|
||||
|
||||
capLogfile() {
|
||||
fs.appendFile(this.logfile, '-----------\n');
|
||||
fs.appendFileSync(this.logfile, '-----------\n');
|
||||
}
|
||||
|
||||
get timestamp() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue