Fix port argument parsing

This commit is contained in:
Markus Scully 2023-06-05 14:18:32 +02:00
parent be1c243017
commit 20177fe547
3 changed files with 1968 additions and 4 deletions

View file

@ -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;

View file

@ -43,7 +43,7 @@ class ServerInterface {
}
capLogfile() {
fs.appendFile(this.logfile, '-----------\n');
fs.appendFileSync(this.logfile, '-----------\n');
}
get timestamp() {