server for auth, more goodies

This commit is contained in:
polwex 2026-04-19 00:54:39 +07:00
parent f83bce8e2b
commit 7cebe39a14
7 changed files with 80 additions and 24 deletions

View file

@ -1,4 +1,5 @@
import { serve } from "bun"
import { runtimeConfig } from "./server/config"
import { initDb } from "./server/db"
import {
registerOptions,
@ -13,8 +14,10 @@ import index from "./index.html"
await initDb()
const server = serve({
port: 5174,
hostname: runtimeConfig.host,
port: runtimeConfig.port,
routes: {
"/healthz": () => Response.json({ ok: true }),
"/*": index,
"/api/auth/register/options": { POST: registerOptions },