Skip to content

Commit

Permalink
Merge pull request #2 from MatheusCoxxxta/development
Browse files Browse the repository at this point in the history
Configs de banco de dados
  • Loading branch information
MatheusCoxxxta authored May 6, 2020
2 parents 409c26b + ff011da commit e5919b5
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
.env
202 changes: 200 additions & 2 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1"
"dotenv": "^8.2.0",
"express": "^4.17.1",
"mongoose": "^5.9.12"
},
"devDependencies": {
"nodemon": "^2.0.3"
Expand Down
11 changes: 10 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
const express = require('express')
const mongoose = require('mongoose');
require('dotenv').config()

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

mongoose.connect("mongodb+srv://iPet:iPet1234@ipet-s4u0w.mongodb.net/test?retryWrites=true&w=majority", {
useNewUrlParser: true,
useUnifiedTopology: true
})


app.use('/api', routes)

app.listen(3001)

// Server
// Server iPet

0 comments on commit e5919b5

Please sign in to comment.