Сервер на Hono, клиент Google и его мок, переводы ru/kk/en, тесты по сценариям, проверки и деплой (Dockerfile, /healthz). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
19 lines
599 B
TypeScript
19 lines
599 B
TypeScript
import { serve } from "@hono/node-server";
|
|
import { createApp } from "./app.js";
|
|
import { loadConfig } from "./config.js";
|
|
import { initSentry } from "./sentry.js";
|
|
|
|
initSentry(process.env);
|
|
const config = loadConfig(process.env);
|
|
const app = createApp(config);
|
|
|
|
const server = serve({ fetch: app.fetch, port: config.port, hostname: "0.0.0.0" }, (info) => {
|
|
console.log(
|
|
`executive-ai listening on :${info.port}${config.google.isMock ? " (mock Google)" : ""}`,
|
|
);
|
|
});
|
|
|
|
for (const signal of ["SIGTERM", "SIGINT"] as const) {
|
|
process.on(signal, () => server.close(() => process.exit(0)));
|
|
}
|