Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSimmmons committed Aug 25, 2019
1 parent e93a9c3 commit a7f3339
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 1,003 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
.DS_Store
config.json
4 changes: 4 additions & 0 deletions configExample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"mongoDBPassword": "",
"mongoDBUser": ""
}
1,001 changes: 1 addition & 1,000 deletions data/products.json

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions models/contact.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const mongoose = require('mongoose');

const contactSchema = new mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
name: String,
email: String,
message: String
});

module.exports = mongoose.model('Contact', contactSchema);
9 changes: 9 additions & 0 deletions models/products.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const mongoose = require('mongoose');

const productSchema = new mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
name: String,
price: Number
});

module.exports = mongoose.model('Product', productSchema);
179 changes: 179 additions & 0 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mongodb",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -17,6 +17,9 @@
},
"homepage": "https://github.com/19WDWU02/mongoDB#readme",
"dependencies": {
"express": "^4.17.1"
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"mongoose": "^5.6.10"
}
}
Loading

0 comments on commit a7f3339

Please sign in to comment.