feat(auth): setup/login/logout, argon2id, sessions, login rate limit

This commit is contained in:
marcuspaico
2026-08-17 14:11:00 -07:00
parent 3c796da649
commit 0b8e897e31
5 changed files with 162 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
import { Hono } from "hono";
import { openDb } from "./db";
import { loadOrCreateKey } from "./lib/crypto";
import { createApp } from "./app";
const app = new Hono();
app.get("/api/health", (c) => c.json({ ok: true }));
const dataDir = process.env.DATA_DIR ?? "./data";
const app = createApp({ db: openDb(dataDir), key: loadOrCreateKey(dataDir) });
export default { port: Number(process.env.PORT ?? 3000), fetch: app.fetch };