Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ This project can be used as a boiler plate for building a MongoDB-Express-React-
#Database server connection URI. If you are using mLab, this needs to be created at https://mlab.com/, and would look like the following:
MONGODB_URI = 'mongodb://<user_name>:<password>@xxxxx.mlab.com:xxxxx/<db_name>'

#Sentry url need to be created at https://sentry.io/welcome/, and would look like the following:
SENTRY_DSN = https://<code>@sentry.io/<code>
- Run ``$ npm run dev`` to start both front end and back end on ports 5000 and 3000 respectively
- Run ``$ npm run start`` to start the back end express server on port 5000

Expand Down
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
var express = require("express");
var app = express();
const Sentry = require('@sentry/node');
var AuthRouter = require("./routes/Authentication");
var UserRouter = require("./routes/User");
var ItemRouter = require("./routes/Item");
var config = require("./config")

const path = require("path");

Sentry.init({
dsn: config.dsn,
});

var mongoose = require('mongoose');
mongoose.connect(config.mLabURI);

Expand Down
2 changes: 2 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ module.exports = {
cloudinaryCloudName: process.env.CLOUDINARY_CLOUD_NAME,
//mLab credentials
mLabURI: process.env.MONGODB_URI,
//sentry url
dsn: process.env.SENTRY_DSN,
};
96 changes: 96 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 @@ -12,6 +12,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@sentry/node": "^5.6.2",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.2",
"cloudinary": "^1.13.2",
Expand Down