Merge pull request #659 from braydonf/readme

Update README to reflect running as a Bitcore Node service.
This commit is contained in:
Patrick Nagurny 2015-09-03 18:19:03 -04:00
commit dd3d590a44
2 changed files with 20 additions and 86 deletions

104
README.md
View File

@ -1,59 +1,23 @@
# *insight* # Insight UI
*insight* is an open-source bitcoin blockchain explorer with complete REST A Bitcoin blockchain explorer web application service for [Bitcore Node](https://github.com/bitpay/bitcore-node) using the [Insight API](https://github.com/bitpay/insight-api).
and websocket APIs. Insight runs in NodeJS, uses AngularJS for the
front-end and LevelDB for storage.
Check some screenshots and more details at [insight's project homepage](http://insight.is/). ## Getting Started
*Insight* project is now split into two repositories. One for the [API](https://github.com/bitpay/insight-api) and for the front-end. This repository is for the front-end, which will install the API as a NPM dependency. ```bash
npm install -g bitcore-node
## Prerequisites bitcore-node create mynode
cd mynode
* **Node.js v0.10.x** - Download and Install [Node.js](http://www.nodejs.org/download/). bitcore-node add insight-api
bitcore-node add insight-ui
* **NPM** - Node.js package manager, should be automatically installed when you get node.js. bitcore-node start
```
## Quick Install
Check the Prerequisites section above before installing.
To install Insight, clone the main repository:
$ git clone https://github.com/bitpay/insight.git && cd insight
Install dependencies:
$ npm install
Run the main application:
$ npm start
Then open a browser and go to:
http://localhost:3001
If *insight* reports problems connecting to **bitcoind** please check the CONFIGURATION section of
[insight-api README](https://github.com/bitpay/insight-api/blob/master/README.md). To set the
environment variables run something like:
$ INSIGHT_NETWORK=livenet BITCOIND_USER=user BITCOIND_PASS=pass INSIGHT_PUBLIC_PATH=public npm start
Please note that the app will need to sync its internal database
with the blockchain state, which may take some time. You can check
sync progress from within the web interface. More details about that process
on [insight-api README](https://github.com/bitpay/insight-api/blob/master/README.md).
## Nginx Setup
To use Nginx as a reverse proxy for Insight, use the following base [configuration](https://gist.github.com/matiu/bdd5e55ff0ad90b54261)
Open a web browser to `http://localhost:3001/insight/`
## Development ## Development
To run insight locally for development mode: To run Insight UI locally in development mode:
Install bower dependencies: Install bower dependencies:
@ -67,44 +31,15 @@ To compile and minify the web application's assets:
$ grunt compile $ grunt compile
``` ```
There is a convinent Gruntfile.js for automation during editing the code There is a convenient Gruntfile.js for automation during editing the code
``` ```
$ grunt $ grunt
``` ```
In case you are developing *insight* and *insight-api* toghether, you can do the following:
* Install insight and insight-api on the same path ($IROOT)
```
$ cd $IROOT/insight
$ grunt
```
in other terminal:
```
$ cd $IROOT/insight-api
$ ln -s ../insight/public
$ INSIGHT_PUBLIC_PATH=public node insight.js
```
```
INSIGHT_PUBLIC_PATH=insight/public grunt
```
at insight-api's home path (edit the path according your setup).
**also** in the insight-api path. (So you will have two grunt processes running, one for insight and one for insight-api).
## Multilanguage support ## Multilanguage support
insight use [angular-gettext](http://angular-gettext.rocketeer.be) for Insight UI uses [angular-gettext](http://angular-gettext.rocketeer.be) for multilanguage support.
multilanguage support.
To enable a text to be translated, add the ***translate*** directive to html tags. See more details [here](http://angular-gettext.rocketeer.be/dev-guide/annotate/). Then, run: To enable a text to be translated, add the ***translate*** directive to html tags. See more details [here](http://angular-gettext.rocketeer.be/dev-guide/annotate/). Then, run:
@ -112,12 +47,11 @@ To enable a text to be translated, add the ***translate*** directive to html tag
grunt compile grunt compile
``` ```
This action will create a template.pot file in ***po/*** folder. You can open This action will create a template.pot file in ***po/*** folder. You can open it with some PO editor ([Poedit](http://poedit.net)). Read this [guide](http://angular-gettext.rocketeer.be/dev-guide/translate/) to learn how to edit/update/import PO files from a generated POT file. PO file will be generated inside po/ folder.
it with some PO editor ([Poedit](http://poedit.net)). Read this [guide](http://angular-gettext.rocketeer.be/dev-guide/translate/) to learn how to edit/update/import PO files from a generated POT file. PO file will be generated inside po/ folder.
If you make new changes, simply run **grunt compile** again to generate a new .pot template and the angular javascript ***js/translations.js***. Then (if use Poedit), open .po file and choose ***update from POT File*** from **Catalog** menu. If you make new changes, simply run **grunt compile** again to generate a new .pot template and the angular javascript ***js/translations.js***. Then (if use Poedit), open .po file and choose ***update from POT File*** from **Catalog** menu.
Finally changes your default language from ***public/src/js/config*** Finally changes your default language from ***public/src/js/config***
``` ```
gettextCatalog.currentLanguage = 'es'; gettextCatalog.currentLanguage = 'es';
@ -130,11 +64,11 @@ compile***.
## Note ## Note
For more details about the *insight API* configs and end-point, just go to [insight API github repository](https://github.com/bitpay/insight-api) or read the [documentation](https://github.com/bitpay/insight-api/blob/master/README.md) For more details about the [Insight API](https://github.com/bitpay/insight-api) configuration and end-points, go to [Insight API GitHub repository](https://github.com/bitpay/insight-api).
## Contribute ## Contribute
Contributions and suggestions are welcomed at [insight github repository](https://github.com/bitpay/insight). Contributions and suggestions are welcomed at the [Insight UI GitHub repository](https://github.com/bitpay/insight).
## License ## License

View File

@ -1,7 +1,7 @@
{ {
"name": "insight-ui", "name": "insight-ui",
"description": "An open-source frontend for the Insight API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.", "description": "An open-source frontend for the Insight API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.",
"version": "0.2.7", "version": "0.3.0",
"repository": "git://github.com/bitpay/insight.git", "repository": "git://github.com/bitpay/insight.git",
"contributors": [ "contributors": [
{ {