From 84857b32d57cd0db504925f2c76c1821c53c342d Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 5 Jun 2016 21:23:27 -0700 Subject: [PATCH] readme --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 314a68b5..5bfec5ac 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,13 @@ Read the docs here: http://bcoin.io/docs/ ## Example Usage +- [Creating a blockchain and mempool](#creating-a-blockchain-and-mempool) +- [Connecting to the P2P network](#connecting-to-the-p2p-network) +- [Doing and SPV sync](#doing-an-spv-sync) +- [High-level usage with the Node object](#high-level-usage-with-the-node-object) +- [Running a full node in the browser](#running-a-full-node-in-the-browser) +- [CLI Usage](#cli-usage) + ### Creating a blockchain and mempool ``` js @@ -206,7 +213,7 @@ pool.open(function(err) { }); ``` -### High-level usage for Node object +### High-level usage with the Node object ``` js var bcoin = require('bcoin').set('main'); @@ -293,6 +300,16 @@ node.chain.on('full', function() { }); ``` +### Running a full node in the browser + +``` bash +$ cd ~/bcoin +$ make # Browserify bcoin +$ node browser/server.js 80 # Start up a simple webserver and websocket->tcp bridge +``` + +You should see something like this: http://i.imgur.com/0pWySyZ.png + ### CLI Usage ``` bash