add submodule

This commit is contained in:
Hri7566 2022-05-28 22:38:56 -04:00
parent d24da98754
commit 04defb8008
6 changed files with 13 additions and 6 deletions

1
.env
View File

@ -2,3 +2,4 @@ ADMINPASS=burgerass
SALT=๖ۣۜH͜r̬i͡7566
MONGO_URL=mongodb://127.0.0.1/?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&ssl=false
SSL=false
SERVE_FILES=true

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "mpp.hri7566.info"]
path = mpp.hri7566.info
url = git@gitlab.com:Hri7566/mpp.hri7566.info.git

0
http-server.js Normal file
View File

1
mpp.hri7566.info Submodule

@ -0,0 +1 @@
Subproject commit 91ff8343d35176eb8bcfb4c51396871a7ddac5b6

View File

@ -12,11 +12,13 @@ var logger = new Logger("Database");
mongoose.connect(process.env.MONGO_URL, {
useNewUrlParser: true,
useUnifiedTopology: true
useUnifiedTopology: true,
connectTimeoutMS: 1000
}, err => {
if (err) {
console.error(err);
return;
logger.error("Unable to connect to database service");
process.exit(1);
}
logger.log("Connected");
});

View File

@ -6,20 +6,20 @@ class Logger {
}
log(args) {
console.log(chalk.green(`[${this.context}]`), args);
console.log(chalk.blue(`[INFO] [${this.context}]`), args);
}
warn(args) {
console.warn(chalk.yellow(`[WARN] [${this.context}]`), args);
console.warn(chalk.yellow(`[WARNING] [${this.context}]`), args);
}
error(args) {
console.error(chalk.red(`[ERR] [${this.context}]`), args);
console.error(chalk.red(`[ERROR] [${this.context}]`), args);
}
debug(args) {
if (process.env.DEBUG_ENABLED) {
console.log(chalk.blue(`[DEBUG] [${this.context}]`), args);
console.log(chalk.green(`[DEBUG] [${this.context}]`), args);
}
}
}