We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85f5964 commit b1c782fCopy full SHA for b1c782f
src/db.js
@@ -2,7 +2,7 @@ import { MongoClient } from 'mongodb'
2
3
export let db
4
5
-const URL = 'mongodb://localhost:27017/guide'
+const URL = process.env.MONGO_URL || 'mongodb://localhost:27017/guide'
6
7
export const connectToDB = async () => {
8
const client = new MongoClient(URL, { useNewUrlParser: true })
0 commit comments