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})`) +})