Skip to content

Commit

Permalink
ui html added
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed May 30, 2021
1 parent 442a9b7 commit e08d7f6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@ dist
.dynamodb/

# TernJS port file
.tern-port
.tern-port
.vercel
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(process.env.MONGODB_URI, {useNewUrlParser: true}, (err) => {
mongoose.connect('mongodb+srv://aditya:vercel@surveydb.lkwaz.mongodb.net/myFirstDatabase?retryWrites=true&w=majority', {useNewUrlParser: true}, (err) => {
if(!err) { console.log('MongoDB Connection Succeeded.') }
else { console.log('Error in DB Connection : '+ err)}
});
Expand Down
18 changes: 18 additions & 0 deletions ui/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

<!DOCTYPE html>
<html>
<head>
<title>Surveyor BE</title>
</head>
<body>
<h1>Surveyor BE</h1>

<div>&nbsp;</div>
<div>Try <a href="/user/">/user/</a> endpoint</div>

<div>&nbsp;</div>
<div>
Github: <a href="https://github.com/Aditya-Thakur/surveyorBE">https://github.com/Aditya-Thakur/surveyorBE</a>
</div>
</body>
</html>
10 changes: 5 additions & 5 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"name": "surveyor-be",
"version": 2,
"env": {
"MONGODB_URI": "@my-mongodb-uri"
},
"builds": [
{
"src": "./server.js",
Expand All @@ -14,6 +10,10 @@
{
"src": "/(.*)",
"dest": "/"
}
},
{
"src": "/",
"dest": "ui/build/index.html"
}
]
}

0 comments on commit e08d7f6

Please sign in to comment.