chore: 优化https server重启

This commit is contained in:
xiaojunnuo
2024-10-26 18:01:06 +08:00
parent 513a5b49c1
commit be2f0aa435
7 changed files with 78 additions and 58 deletions
@@ -4,7 +4,7 @@ import { SysInstallInfo, SysSettingsService } from '@certd/lib-server';
import { getVersion } from '../../utils/version.js';
import dayjs from 'dayjs';
import { Application } from '@midwayjs/koa';
import { HttpsServerOptions, startHttpsServer } from './https/server.js';
import { httpsServer, HttpsServerOptions } from './https/server.js';
@Autoload()
@Scope(ScopeEnum.Singleton)
@@ -41,7 +41,7 @@ export class AutoZPrint {
logger.info('Https server is not enabled');
return;
}
await startHttpsServer({
httpsServer.start({
...this.httpsConfig,
app: this.app,
});