Migrated auth to Nitro

This commit is contained in:
lucast committed 2026-09-29 00:23:30 +02:00
1 parent 27feb1ce95
commit eb4e9f0700
16 files changed
+517 -129

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import type { H3Event } from "h3"
/**
* Read private backend settings at runtime. Nuxt's NUXT_* runtime overrides
* take precedence, while existing standalone-backend variable names remain
* usable during the migration.
*/
export function getBackendRuntimeConfig(event?: H3Event) {
const config = useRuntimeConfig(event)
return {
mongodbUri: config.mongodbUri || process.env.MONGODB_URI || "",
uploadDir: config.uploadDir || process.env.UPLOAD_DIR || "",
tokenExpire: config.tokenExpire || process.env.TOKEN_EXPIRE || "1h",
}
}