Skip to content
Merged
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ jspm_packages

# Optional for people who uses JetBrains products
*.idea

dump.rdb
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@ Note: Without the GitHub oauth key the number of requests is throttled at 60 per
Run Redis and Server
----------

If you are running locally then run local redis server

```bash
$ redis-server
```

On heroku, you can set up `Heroku Redis` add-on and it sets `REDIS_URL` enviornment variable.

In a separate window:
```bash
$ node server
```

Note: For production run `export NODE_ENV="production"` before starting the server.

1 change: 0 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ <h4>About</h4>
developed by <a href="https://github.com/debugger22" target="_blank">@debugger22</a><br/><br/>
<div id="coinwidget-bitcoin-37XgcaBrHibCMHzvZeZcj5mX5kYn8LUnui"></div><br/>
ProTip: It's actually kind of nice to leave on the background<br/><br/>
<a href="https://www.digitalocean.com/" target="_blank"><img style="width:150px;cursor: pointer;" src="https://www.digitalocean.com/assets/media/logos-badges/DO_Powered_by_Badge_white-a05c38f6.png" alt="DigitalOcean" /></a>
</div>
<div class="footer-right-text-block">
inspired by <a href="http://hatnote.com" target="_blank">hatnote</a><br/>
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"redis": "^2.6.2",
"request": "^2.75.0",
"socket.io": "^1.4.8"
},
"engines": {
"node": "4.x"
}
}
6 changes: 5 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ var helmet = require('helmet'); // To change response headers

// To temporarily store JSON data from GitHub and also
// the number of connected users
var redis = require("redis"),
var redis = require("redis");
if (process.env.REDIS_URL) {
redis_client = redis.createClient(process.env.REDIS_URL);
} else {
redis_client = redis.createClient();
}

var path = require('path');

Expand Down