diff --git a/lib/server/constants.ts b/lib/server/constants.ts index 27bcb67..f136a20 100644 --- a/lib/server/constants.ts +++ b/lib/server/constants.ts @@ -1,4 +1,5 @@ import turndown from "turndown"; +import { RuntimeConfig } from "nuxt/schema"; export const ContentFilenameRegex = /\.(doc|docx|md|markdown)$/i; export const emailRegex: RegExp = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; @@ -112,3 +113,32 @@ export const h2m = new turndown({ emDelimiter: "*", bulletListMarker: "+", }); + +export const rc: RuntimeConfig & any = { + captcha: { + secret: process.env.CAPTCHASECRET, + key: process.env.CAPTCHAKEY, + }, + database: { + user: process.env.DBUSER, + password: process.env.DBPASS, + name: process.env.DBNAME, + uri: `mongodb://${process.env.DB}`, + }, + jwt: process.env.JWT, + public: { + recaptcha: { + v2SiteKey: process.env.CAPTCHAKEY, + }, + auth: { + computed: { + origin: "127.0.0.1", + }, + }, + // apiBase: "/api" + }, + nodebb: { + masterToken: process.env.nbb_bearer, + }, + app: {}, +};