This commit is contained in:
2025-08-22 20:19:15 -04:00
parent f19552929e
commit 391bf3d1f8
58 changed files with 535 additions and 24 deletions

View File

@@ -43,7 +43,8 @@ await routeImporter(AppRoot.app, 'src/', [
'routes/api',
'routes/auth',
'routes/accounts',
'routes/match'
'routes/match',
'routes/img'
]);
// deno-lint-ignore require-await
@@ -59,7 +60,7 @@ const onListen = async () => {
await Deno.mkdir('persist');
await Promise.all(Object.values(Server).map(base => ((base as ServerContentBase).kvInit ? (base as ServerContentBase).kvInit() : undefined)));
Object.values(Server).forEach(base => ((base as ServerContentBase).start ? (base as ServerContentBase).start() : undefined));
Server.emit('server.start', undefined);
}
const netConfig = getNetConfig();
@@ -162,7 +163,7 @@ Deno.addSignalListener('SIGINT', () => {
for (const socket of consoleSockets) socket.destroy();
for (const socket of gameSockets) socket.sendNotification(PushNotificationId.ModerationQuitGame);
Object.values(Server).forEach(base => ((base as ServerContentBase).destroy ? (base as ServerContentBase).destroy() : undefined));
Server.emit('server.destroy', undefined);
});
Server.Commands.addRootCommand(new Command({