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

View file

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