Undo the full-tree rollback in 6ea1b3d and restore the pre-rollback v1.2.0 code. Preserve the new asset flow rules, abnormal inventory separation, range drilldowns and date picker; adapt the regression test to the restored routes layout.
16 lines
562 B
TypeScript
16 lines
562 B
TypeScript
import { serve } from '@hono/node-server';
|
|
import { createApp } from './app.js';
|
|
import { startBackgroundServices } from './bootstrap.js';
|
|
import { assertRuntimeConfig, serverConfig } from './config.js';
|
|
|
|
// 配置错误在启动期暴露,而不是等到第一次请求才 500。
|
|
assertRuntimeConfig();
|
|
|
|
const app = createApp();
|
|
|
|
console.log(`Server starting on port ${serverConfig.port}...`);
|
|
startBackgroundServices();
|
|
serve({ fetch: app.fetch, port: serverConfig.port }, () => {
|
|
console.log(`Server running at http://localhost:${serverConfig.port}`);
|
|
});
|