reworked authentication and permission handling

This commit is contained in:
dswbx
2025-01-11 15:27:58 +01:00
parent 5823c2d245
commit bd4bc14282
20 changed files with 190 additions and 101 deletions

View File

@@ -1,5 +1,6 @@
import path from "node:path";
import type { Config } from "@libsql/client/node";
import { config } from "core";
import type { MiddlewareHandler } from "hono";
import open from "open";
import { fileExists, getRelativeDistPath } from "../../utils/sys";
@@ -26,7 +27,7 @@ export async function serveStatic(server: Platform): Promise<MiddlewareHandler>
}
export async function attachServeStatic(app: any, platform: Platform) {
app.module.server.client.get("/*", await serveStatic(platform));
app.module.server.client.get(config.server.assets_path + "*", await serveStatic(platform));
}
export async function startServer(server: Platform, app: any, options: { port: number }) {