executive-ai/src/index.ts
Peppa 56cba4cad0 EA-1: приложение — подключение календаря Google и список дел на 7 дней
Сервер на Hono, клиент Google и его мок, переводы ru/kk/en, тесты по сценариям,
проверки и деплой (Dockerfile, /healthz).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 12:29:10 +05:00

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)));
}