forked from Hri7566/mpp-server-dev2
add submodule
This commit is contained in:
parent
d24da98754
commit
04defb8008
1
.env
1
.env
|
@ -2,3 +2,4 @@ ADMINPASS=burgerass
|
||||||
SALT=๖ۣۜH͜r̬i͡7566
|
SALT=๖ۣۜH͜r̬i͡7566
|
||||||
MONGO_URL=mongodb://127.0.0.1/?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&ssl=false
|
MONGO_URL=mongodb://127.0.0.1/?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&ssl=false
|
||||||
SSL=false
|
SSL=false
|
||||||
|
SERVE_FILES=true
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "mpp.hri7566.info"]
|
||||||
|
path = mpp.hri7566.info
|
||||||
|
url = git@gitlab.com:Hri7566/mpp.hri7566.info.git
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 91ff8343d35176eb8bcfb4c51396871a7ddac5b6
|
|
@ -12,11 +12,13 @@ var logger = new Logger("Database");
|
||||||
|
|
||||||
mongoose.connect(process.env.MONGO_URL, {
|
mongoose.connect(process.env.MONGO_URL, {
|
||||||
useNewUrlParser: true,
|
useNewUrlParser: true,
|
||||||
useUnifiedTopology: true
|
useUnifiedTopology: true,
|
||||||
|
connectTimeoutMS: 1000
|
||||||
}, err => {
|
}, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return;
|
logger.error("Unable to connect to database service");
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
logger.log("Connected");
|
logger.log("Connected");
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,20 +6,20 @@ class Logger {
|
||||||
}
|
}
|
||||||
|
|
||||||
log(args) {
|
log(args) {
|
||||||
console.log(chalk.green(`[${this.context}]`), args);
|
console.log(chalk.blue(`[INFO] [${this.context}]`), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
warn(args) {
|
warn(args) {
|
||||||
console.warn(chalk.yellow(`[WARN] [${this.context}]`), args);
|
console.warn(chalk.yellow(`[WARNING] [${this.context}]`), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
error(args) {
|
error(args) {
|
||||||
console.error(chalk.red(`[ERR] [${this.context}]`), args);
|
console.error(chalk.red(`[ERROR] [${this.context}]`), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug(args) {
|
debug(args) {
|
||||||
if (process.env.DEBUG_ENABLED) {
|
if (process.env.DEBUG_ENABLED) {
|
||||||
console.log(chalk.blue(`[DEBUG] [${this.context}]`), args);
|
console.log(chalk.green(`[DEBUG] [${this.context}]`), args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue