Skip to content

Commit

Permalink
vercel config
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed May 30, 2021
1 parent b15cacf commit cf033ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion models/db.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const mongoose = require('mongoose');

mongoose.connect('mongodb://localhost:27017/surveyDB', {useNewUrlParser: true}, (err) => {
mongoose.connect(process.env.MONGODB_URI, {useNewUrlParser: true}, (err) => {
if(!err) { console.log('MongoDB Connection Succeeded.') }
else { console.log('Error in DB Connection : '+ err)}
});
Expand Down
7 changes: 7 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "surveyor-be",
"version": 2,
"env": {
"MONGODB_URI": "@my-mongodb-uri"
}
}

1 comment on commit cf033ab

@vercel
Copy link

@vercel vercel bot commented on cf033ab May 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.