wow. what a dumb variable name

This commit is contained in:
oat 2020-09-02 16:19:29 +03:00
parent 20240bfdf1
commit 1eebe45e4e
Signed by untrusted user who does not match committer: oat
GPG Key ID: DD83A9617A252385
1 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import * as format from './lib/format';
const config = JSON.parse(fs.readFileSync('./config/config.json', {encoding: 'utf8'}));
const dbClient = mongoose.connect(`${config.dbconnectionURL}/${config.dbname}`, {
const db = mongoose.connect(`${config.dbconnectionURL}/${config.dbname}`, {
useNewUrlParser: true, // idfk what any of this does i just copied an example
useUnifiedTopology: true,
useFindAndModify: false,
@ -37,14 +37,14 @@ const logger = winston.createLogger({
});
logger.info('connecting to mongodb database');
dbClient.then(() => {
db.then(() => {
logger.info('connected to database!');
const app = express();
app.use(express.urlencoded({ extended: true }));
app.set('db', dbClient);
app.set('db', db);
app.set('config', config);
app.set('logger', logger);