Skip to content

Commit 95cd3ea

Browse files
committed
tweaks for heroku
1 parent 7f41e25 commit 95cd3ea

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ node_modules
2020
.DS_Store
2121
Thumbs.db
2222
.problems
23+
.env

app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ var app = express();
3737
/**
3838
* Connect to MongoDB.
3939
*/
40-
mongoose.connect(config.db);
40+
41+
mongoose.connect(process.env.MONGOLAB_URI);
4142
mongoose.connection.on('error', function () {
4243
console.error('MongoDB Connection Error. Make sure MongoDB is running.');
4344
});
@@ -69,7 +70,7 @@ app.use(session({
6970
saveUninitialized: true,
7071
secret: config.sessionSecret,
7172
store: new MongoStore({
72-
url: config.db,
73+
url: process.env.MONGOLAB_URI,
7374
auto_reconnect: true
7475
})
7576
}));

config/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"db": "mongodb://heroku_app31505046:[email protected]:53840/heroku_app31505046",
32
"sessionSecret": "letthegamesbegin",
43
"adminHandles": [
54
"jeffdonthemic",
65
"timhicks24",
76
"lazybaer",
8-
"mess"
7+
"mess",
8+
"nick.castillo"
99
],
1010
"questions": [
1111
"Extent to which the application creatively uses the selected APIs and cloud platform.",

environment.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)