File tree Expand file tree Collapse file tree 6 files changed +15
-3
lines changed
Expand file tree Collapse file tree 6 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,5 @@ jspm_packages
3838
3939# Optional for people who uses JetBrains products
4040* .idea
41+
42+ dump.rdb
Original file line number Diff line number Diff line change 1+ web : node server
Original file line number Diff line number Diff line change @@ -64,14 +64,17 @@ Note: Without the GitHub oauth key the number of requests is throttled at 60 per
6464Run Redis and Server
6565----------
6666
67+ If you are running locally then run local redis server
68+
6769``` bash
6870$ redis-server
6971```
7072
73+ On heroku, you can set up ` Heroku Redis ` add-on and it sets ` REDIS_URL ` enviornment variable.
74+
7175In a separate window:
7276``` bash
7377$ node server
7478```
7579
7680Note: For production run ` export NODE_ENV="production" ` before starting the server.
77-
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ <h4>About</h4>
9191 developed by < a href ="https://github.com/debugger22 " target ="_blank "> @debugger22</ a > < br /> < br />
9292 < div id ="coinwidget-bitcoin-37XgcaBrHibCMHzvZeZcj5mX5kYn8LUnui "> </ div > < br />
9393 ProTip: It's actually kind of nice to leave on the background< br /> < br />
94- < 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 >
9594 </ div >
9695 < div class ="footer-right-text-block ">
9796 inspired by < a href ="http://hatnote.com " target ="_blank "> hatnote</ a > < br />
Original file line number Diff line number Diff line change 3232 "redis" : " ^2.6.2" ,
3333 "request" : " ^2.75.0" ,
3434 "socket.io" : " ^1.4.8"
35+ },
36+ "engines" : {
37+ "node" : " 4.x"
3538 }
3639}
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ var helmet = require('helmet'); // To change response headers
1111
1212// To temporarily store JSON data from GitHub and also
1313// the number of connected users
14- var redis = require ( "redis" ) ,
14+ var redis = require ( "redis" ) ;
15+ if ( process . env . REDIS_URL ) {
16+ redis_client = redis . createClient ( process . env . REDIS_URL ) ;
17+ } else {
1518 redis_client = redis . createClient ( ) ;
19+ }
1620
1721var path = require ( 'path' ) ;
1822
You can’t perform that action at this time.
0 commit comments