adds new pingTimeout argument, fixes maxRequestBody

This commit is contained in:
jardicc 2024-03-04 20:41:38 +01:00
parent 3c44f223f5
commit 767fe79254

View File

@ -24,6 +24,7 @@ export interface Options {
dbOptions: DbOptions; dbOptions: DbOptions;
maxRequestBody: string; maxRequestBody: string;
logHTTPRequests?: boolean; logHTTPRequests?: boolean;
pingTimeout: number;
logLevel: 0 | 1 | 3 | 2; logLevel: 0 | 1 | 3 | 2;
wsEngine: string; wsEngine: string;
} }
@ -59,9 +60,10 @@ export default function getOptions(argv: { [arg: string]: any }): Options {
undefined, undefined,
}, },
dbOptions: dbOptions, dbOptions: dbOptions,
maxRequestBody: argv.passphrase || '16mb', maxRequestBody: argv.maxRequestBody || '16mb',
logHTTPRequests: argv.logHTTPRequests, logHTTPRequests: argv.logHTTPRequests,
logLevel: argv.logLevel || 3, logLevel: argv.logLevel || 3,
pingTimeout: argv.pingTimeout || 20000,
wsEngine: wsEngine:
argv.wsEngine || process.env.npm_package_remotedev_wsengine || 'ws', argv.wsEngine || process.env.npm_package_remotedev_wsengine || 'ws',
}; };