standardize loading of server configuration
parent
670040ae68
commit
d5a9eacef0
@ -0,0 +1,12 @@
|
|||||||
|
var config;
|
||||||
|
try {
|
||||||
|
config = require("../config/config");
|
||||||
|
if (config.adminEmail === 'i.did.not.read.my.config@cryptpad.fr') {
|
||||||
|
console.log("You can configure the administrator email (adminEmail) in your config/config.js file");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log("You can customize the configuration by copying config/config.example.js to config/config.js");
|
||||||
|
config = require("../config/config.example");
|
||||||
|
}
|
||||||
|
module.exports = config;
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
var config;
|
|
||||||
try {
|
|
||||||
config = require("../config/config");
|
|
||||||
} catch (e) {
|
|
||||||
config = require("../config/config.example");
|
|
||||||
}
|
|
||||||
module.exports = config;
|
|
Loading…
Reference in New Issue