From 19fa4f1fcb02eb726e5f9ea539ae79796a9d984a Mon Sep 17 00:00:00 2001 From: devilreef Date: Wed, 29 Apr 2026 12:14:18 +0600 Subject: [PATCH] feat: wire hono app and start server --- src/index.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6bc38b0..7fd8e50 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,15 @@ +import { serve } from '@hono/node-server' +import { Hono } from 'hono' +import { health } from '@/routes/health.js' +import { miniapp } from '@/routes/miniapp.js' +import { sync } from '@/routes/sync.js' import { config } from '@/shared/config.js' -console.log(`starting in ${config.mode} mode...`) +const app = new Hono() +app.route('/', health) +app.route('/', miniapp) +app.route('/', sync) + +serve({ fetch: app.fetch, port: config.port }, ({ port }) => { + console.log(`arcanesync listening on :${port} (${config.mode})`) +})