feat(auth): setup/login/logout, argon2id, sessions, login rate limit
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user