File tree 6 files changed +15
-3
lines changed
6 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,5 @@ jspm_packages
38
38
39
39
# Optional for people who uses JetBrains products
40
40
* .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
64
64
Run Redis and Server
65
65
----------
66
66
67
+ If you are running locally then run local redis server
68
+
67
69
``` bash
68
70
$ redis-server
69
71
```
70
72
73
+ On heroku, you can set up ` Heroku Redis ` add-on and it sets ` REDIS_URL ` enviornment variable.
74
+
71
75
In a separate window:
72
76
``` bash
73
77
$ node server
74
78
```
75
79
76
80
Note: 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>
91
91
developed by < a href ="https://github.com/debugger22 " target ="_blank "> @debugger22</ a > < br /> < br />
92
92
< div id ="coinwidget-bitcoin-37XgcaBrHibCMHzvZeZcj5mX5kYn8LUnui "> </ div > < br />
93
93
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 >
95
94
</ div >
96
95
< div class ="footer-right-text-block ">
97
96
inspired by < a href ="http://hatnote.com " target ="_blank "> hatnote</ a > < br />
Original file line number Diff line number Diff line change 32
32
"redis" : " ^2.6.2" ,
33
33
"request" : " ^2.75.0" ,
34
34
"socket.io" : " ^1.4.8"
35
+ },
36
+ "engines" : {
37
+ "node" : " 4.x"
35
38
}
36
39
}
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ var helmet = require('helmet'); // To change response headers
11
11
12
12
// To temporarily store JSON data from GitHub and also
13
13
// 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 {
15
18
redis_client = redis . createClient ( ) ;
19
+ }
16
20
17
21
var path = require ( 'path' ) ;
18
22
You can’t perform that action at this time.
0 commit comments