From 5be2b660f42729337cfcd951072da45288099ab0 Mon Sep 17 00:00:00 2001 From: Jenny Lian Date: Thu, 20 Oct 2016 19:07:06 -0700 Subject: [PATCH] added some details to README --- .gitignore | 3 +++ README.md | 23 ++++++++++++++++++----- app/public/js/main.js | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 5148e52..93d9302 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ jspm_packages # Optional REPL history .node_repl_history + +# Optional for people who uses JetBrains products +*.idea diff --git a/README.md b/README.md index 54a1b37..1c077c1 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,20 @@ But seriously, [listen-to-wikipedia](https://github.com/hatnote/listen-to-wikipe Use [`ULTIMATE_DREAM_KILLER`](https://github.com/debugger22/github-audio/commit/ed47067f5e56ab70d65fa31f72bf2dbc513f8f56) to filter all events except closed PRs. -Media +Media Attention ----- - * [The Next Web](http://thenextweb.com/apps/2016/10/03/this-site-tracks-events-across-github-to-generate-calming-work-music/) * [Product Hunt](https://www.producthunt.com/tech/github-audio) -Installation on OSX +# Installing dependencies + +This application requires: +* node +* npm +* redix + +Dependency Installation on OSX ------------------- ```bash @@ -26,7 +32,7 @@ $ brew install npm $ brew install redis ``` -Installation on Linux +Dependency Installation on Linux --------------------- ```bash @@ -36,6 +42,7 @@ $ sudo apt-get install npm $ sudo apt-get install redis-server ``` +# Running the Application Install node packages --------------------- @@ -54,11 +61,17 @@ $ export GITHUB_OAUTH_KEY= Note: Without the GitHub oauth key the number of requests is throttled at 60 per hour. It can be increased to 5000 per hour by using an oauth key. -Run server +Run Redis and Server ---------- +```bash +$ redis-server +``` + +In a separate window: ```bash $ node server ``` Note: For production run `export NODE_ENV="production"` before starting the server. + diff --git a/app/public/js/main.js b/app/public/js/main.js index 50e0ae4..5c874e8 100644 --- a/app/public/js/main.js +++ b/app/public/js/main.js @@ -32,7 +32,7 @@ var svg_background_color_online = '#0288D1', -var socket = io(document.location.hostname); +var socket = io(); socket.on('github', function (data) { $('.online-users-count').html(data.connected_users); data.data.forEach(function(event){