From 7e1962617d3952909c70f8e8eae6b3136d393af6 Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Tue, 21 Jan 2014 21:02:06 +0000 Subject: [PATCH 1/5] Improve documentation of install process. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index efc9ae0..80a8235 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ Project description. ## Prerequisites -* Node.js - Download and Install [Node.js](http://www.nodejs.org/download/). You can also follow [this gist](https://gist.github.com/isaacs/579814) for a quick and easy way to install Node.js and npm +* Node.js - Download and Install [Node.js](http://www.nodejs.org/download/). You can also follow [this gist](https://gist.github.com/isaacs/579814) for a quick and easy way to install Node.js and npm, or the Ubuntu way: git clone git@github.com:joyent/node.git && cd node && git checkout v0.10.24 && ./configure && make && make install` * MongoDB - Download and Install [MongoDB](http://www.mongodb.org/downloads) - Make sure it's running on the default port (27017). +* Bitcoind - Download and Install [Bitcoin](http://bitcoin.org/en/download) - You should make sure to configure RPC security and `txindex`. For an example, see `./etc/bitcoind/bitcoin.conf` ### Tools Prerequisites * NPM - Node.js package manager, should be installed when you install node.js. @@ -30,9 +31,7 @@ $ npm install -g bower Then clone it wherever you want: - $ git clone git@github.com:/insight.git - - $ cd myster + $ git clone git@github.com:/insight.git && cd insight Install Grunt Command Line Interface: @@ -41,6 +40,7 @@ $ npm install -g bower Install dependencies: $ npm install + $ bower install We use [Grunt](https://github.com/gruntjs/grunt-cli) to start the server: From 2762145d5ff40ee7c97769cba757fe76c938c3d0 Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Tue, 21 Jan 2014 21:08:37 +0000 Subject: [PATCH 2/5] Add version requirements to Node in README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 80a8235..743a585 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Project description. ## Prerequisites -* Node.js - Download and Install [Node.js](http://www.nodejs.org/download/). You can also follow [this gist](https://gist.github.com/isaacs/579814) for a quick and easy way to install Node.js and npm, or the Ubuntu way: git clone git@github.com:joyent/node.git && cd node && git checkout v0.10.24 && ./configure && make && make install` +* Node.js v0.10.x - Download and Install [Node.js](http://www.nodejs.org/download/). You can also follow [this gist](https://gist.github.com/isaacs/579814) for a quick and easy way to install Node.js and npm, or the Ubuntu way: git clone git@github.com:joyent/node.git && cd node && git checkout v0.10.24 && ./configure && make && make install` * MongoDB - Download and Install [MongoDB](http://www.mongodb.org/downloads) - Make sure it's running on the default port (27017). * Bitcoind - Download and Install [Bitcoin](http://bitcoin.org/en/download) - You should make sure to configure RPC security and `txindex`. For an example, see `./etc/bitcoind/bitcoin.conf` From 904f21405e0de3b51bf0a1126193e7b015f355dc Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Tue, 21 Jan 2014 23:54:58 +0000 Subject: [PATCH 3/5] Allow network to be specified in development envs. --- config/env/development.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/env/development.js b/config/env/development.js index 4820635..c46c11e 100755 --- a/config/env/development.js +++ b/config/env/development.js @@ -13,7 +13,7 @@ module.exports = { port: process.env.BITCOIND_PORT || '18332', disableAgent: true, }, - network: 'testnet', + network: process.env.INSIGHT_NETWORK || 'testnet', disableP2pSync: false, disableHistoricSync: false, }; From 81958638f712f2fb66c2300613845a182bf51c3d Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Wed, 22 Jan 2014 00:01:47 +0000 Subject: [PATCH 4/5] Rename server.js to insight.js for multi-node env. --- Gruntfile.js | 6 +++--- server.js => insight.js | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename server.js => insight.js (100%) diff --git a/Gruntfile.js b/Gruntfile.js index 850dd20..3c90156 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -22,7 +22,7 @@ module.exports = function(grunt) { }, }, js: { - files: ['Gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**'], + files: ['Gruntfile.js', 'insight.js', 'app/**/*.js', 'public/js/**'], tasks: ['jshint'], options: { livereload: true, @@ -48,7 +48,7 @@ module.exports = function(grunt) { }, jshint: { all: { - src: ['Gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**','lib/*.js'], + src: ['Gruntfile.js', 'insight.js', 'app/**/*.js', 'public/js/**','lib/*.js'], options: { jshintrc: true } @@ -63,7 +63,7 @@ module.exports = function(grunt) { nodemon: { dev: { - script: 'server.js', + script: 'insight.js', options: { args: [], ignore: ['public/**', 'test/**','util/**'], diff --git a/server.js b/insight.js similarity index 100% rename from server.js rename to insight.js From 01b5a5a5b747bad35b833aff48265b240ae10e0d Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Wed, 22 Jan 2014 00:09:30 +0000 Subject: [PATCH 5/5] Add details about running insight using pm2. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 743a585..0a347f9 100644 --- a/README.md +++ b/README.md @@ -185,12 +185,19 @@ If you are using node instead of grunt, it is very similar: $ NODE_ENV=test node server -### Development enviroment +### Development environment To run insight locally for development: $ NODE_ENV=development grunt +### Production +You can use [pm2](https://github.com/Unitech/pm2) to manage NodeJS in production: + + $ npm install pm2 -g + $ pm2 start insight.js + + ## Github [Insight](https://github.com/bitpay/insight)