server for auth, more goodies
This commit is contained in:
parent
f83bce8e2b
commit
7cebe39a14
7 changed files with 80 additions and 24 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue