mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): ♻️ Serve frontend from static files instead of proxying another process
This commit is contained in:
parent
5f8c57b3e1
commit
58b4d7454f
8 changed files with 133 additions and 107 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { cwd } from "node:process";
|
||||
import { z } from "@hono/zod-openapi";
|
||||
import { type BunFile, file } from "bun";
|
||||
import { type BunFile, env, file } from "bun";
|
||||
import ISO6391 from "iso-639-1";
|
||||
import { types as mimeTypes } from "mime-types";
|
||||
import { generateVAPIDKeys } from "web-push";
|
||||
|
|
@ -400,7 +401,7 @@ export const ConfigSchema = z
|
|||
}),
|
||||
frontend: z.strictObject({
|
||||
enabled: z.boolean().default(true),
|
||||
url: url.default("http://localhost:3000"),
|
||||
path: z.string().default(env.VERSIA_FRONTEND_PATH || cwd()),
|
||||
routes: z.strictObject({
|
||||
home: urlPath.default("/"),
|
||||
login: urlPath.default("/oauth/authorize"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue