Skip to content

Commit

Permalink
Merge pull request #4 from szechyjs/master
Browse files Browse the repository at this point in the history
Use mLab MongoDB on Heroku
  • Loading branch information
belongstorachel authored Feb 21, 2017
2 parents 2a0f4fe + 1d027b8 commit 488e4c4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
public/client.js
public/crb.css
4 changes: 2 additions & 2 deletions app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
onHeroku = process.env.PORT

if onHeroku
dbString = "mongodb://crb:[email protected]:10046/crb"
dbString = process.env.MONGODB_URI
port = process.env.PORT
else
dbString = "localhost:27017/crb_register"
dbString = "mongodb://localhost:27017/crb_register"
port = 3000

express = require('express')
Expand Down
2 changes: 1 addition & 1 deletion coffee/client.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ->
socket = io.connect(window.location.hostname)
socket = io.connect(window.location.origin)
source = $("#entry-template").html()
template = Handlebars.compile(source)
target = $("tbody")
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "application-name"
, "version": "0.0.1"
, "private": true
, "dependencies": {
"express": "2.5.2"
, "jade": "1.1.x"
, "stylus": ">= 0.0.1"
, "mongoskin": ">= 0.0.1"
, "socket.io": ">= 0.0.1"
, "coffee-script": "latest"
}
}
{
"name": "crb-register",
"version": "0.1.0",
"private": true,
"dependencies": {
"coffee-script": "latest",
"express": "2.5.2",
"jade": "1.1.x",
"mongodb": "^2.2.24",
"mongoskin": ">= 0.0.1",
"socket.io": "< 1.0",
"stylus": ">= 0.0.1"
}
}
21 changes: 0 additions & 21 deletions public/crb.css

This file was deleted.

0 comments on commit 488e4c4

Please sign in to comment.