mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
Switch frontend server to Nuxt
This commit is contained in:
parent
9476770cdb
commit
dc17cffd75
24 changed files with 921 additions and 22 deletions
18
packages/frontend/server/api/config.ts
Normal file
18
packages/frontend/server/api/config.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { loadConfig } from "c12";
|
||||
import { type Config, defaultConfig } from "config-manager/config.type";
|
||||
|
||||
const promise = loadConfig<Config>({
|
||||
configFile: "./config/config.toml",
|
||||
defaultConfig: defaultConfig,
|
||||
});
|
||||
|
||||
export default defineEventHandler(async () => {
|
||||
const { config } = await promise;
|
||||
return {
|
||||
http: {
|
||||
bind: config?.http.bind,
|
||||
bind_port: config?.http.bind_port,
|
||||
base_url: config?.http.base_url,
|
||||
},
|
||||
};
|
||||
});
|
||||
3
packages/frontend/server/tsconfig.json
Normal file
3
packages/frontend/server/tsconfig.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue