env vars ayy

parent 768250de
......@@ -48,7 +48,8 @@ const main = async () => {
app.use(express.static('public'))
// mongodb
const mongo = await MongoClient.connect('mongodb://localhost:27017', {
const mongo_host = process.env.MONGO_HOST || 'mongodb://localhost:27017'
const mongo = await MongoClient.connect(mongo_host, {
useNewUrlParser: true
})
......@@ -71,4 +72,4 @@ const main = async () => {
})
}
main()
\ No newline at end of file
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment