fix(startup): Adding startup and env var settings

This commit is contained in:
Chris Troutner
2021-08-26 09:21:08 -07:00
parent 46b0c595f9
commit 2a2d940e7c
8 changed files with 76 additions and 28 deletions
+6
View File
@@ -39,11 +39,17 @@ class Server {
// Connect to the Mongo Database.
mongoose.Promise = global.Promise
mongoose.set('useCreateIndex', true) // Stop deprecation warning.
console.log(
`Connecting to MongoDB with this connection string: ${config.database}`
)
await mongoose.connect(config.database, {
useUnifiedTopology: true,
useNewUrlParser: true
})
console.log(`Starting environment: ${config.env}`)
console.log(`Debug level: ${config.debugLevel}`)
// MIDDLEWARE START
app.use(convert(logger()))