refactor(nuxt): move nuxt runtime config to separate exported variable
This commit is contained in:
parent
eb69412fd1
commit
911a8775bb
@ -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: {},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user