Skip to content

Commit

Permalink
Deploy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusCoxxxta committed May 13, 2020
1 parent ff011da commit db142eb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"mongoose": "^5.9.12"
Expand Down
7 changes: 6 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ require('dotenv').config()

const app = express()
const routes = require('./src/Routes')
const cors = require('cors');


app.use(cors());


mongoose.connect("mongodb+srv://iPet:iPet1234@ipet-s4u0w.mongodb.net/test?retryWrites=true&w=majority", {
useNewUrlParser: true,
Expand All @@ -13,6 +18,6 @@ mongoose.connect("mongodb+srv://iPet:iPet1234@ipet-s4u0w.mongodb.net/test?retryW

app.use('/api', routes)

app.listen(3001)
app.listen(process.env.PORT || 3001)

// Server iPet

0 comments on commit db142eb

Please sign in to comment.