mirror of
https://github.com/lucaspalomodevelop/JSSTE.git
synced 2026-03-17 09:04:36 +00:00
change config
This commit is contained in:
parent
d01f9fb233
commit
1d7b951a10
@ -1,5 +1,19 @@
|
||||
let config = {
|
||||
let config = {};
|
||||
let configvar = {
|
||||
templatePath: __dirname + "\\src\\templates",
|
||||
pagePath: __dirname + "\\src\\pages",
|
||||
};
|
||||
|
||||
config.get = function (key) {
|
||||
return configvar[key];
|
||||
};
|
||||
|
||||
config.getConfig = function () {
|
||||
return configvar;
|
||||
};
|
||||
|
||||
config.set = function (key, value) {
|
||||
configvar[key] = value;
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
||||
@ -3,8 +3,8 @@ const fs = require("fs");
|
||||
//let appdir = path.join(__dirname, "..");
|
||||
let app = {};
|
||||
|
||||
app.config = require("./config");
|
||||
|
||||
app.__config = require("./config")
|
||||
app.config = app.__config.getConfig();
|
||||
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user