Make APIs more similar

This commit is contained in:
Darren Clarke 2026-02-15 10:29:52 +01:00
parent 9f0e1f8b61
commit c40d7d056e
57 changed files with 3994 additions and 1801 deletions

View file

@ -1,7 +1,8 @@
import { serve } from "@hono/node-server";
import WhatsappService from "./service.ts";
import { createLogger } from "@link-stack/logger";
import { createRoutes } from "./routes.ts";
import { createLogger } from "./lib/logger";
import WhatsappService from "./service.ts";
const logger = createLogger("bridge-whatsapp-index");
@ -10,7 +11,7 @@ const main = async () => {
await service.initialize();
const app = createRoutes(service);
const port = parseInt(process.env.PORT || "5000", 10);
const port = Number.parseInt(process.env.PORT || "5000", 10);
serve({ fetch: app.fetch, port }, (info) => {
logger.info({ port: info.port }, "bridge-whatsapp listening");
@ -26,7 +27,7 @@ const main = async () => {
process.on("SIGINT", shutdown);
};
main().catch((err) => {
logger.error(err);
main().catch((error) => {
logger.error(error);
process.exit(1);
});