From 78eeae67637736ab6eab2c0f97e35deead3262ff Mon Sep 17 00:00:00 2001 From: Matthew Zipkin Date: Thu, 1 Nov 2018 11:58:28 -0700 Subject: [PATCH] browser: update script import (#622) * browser: update since refactor * docs: redirect browser to new guide --- browser/index.html | 2 +- browser/src/app.js | 3 +-- docs/Running-in-the-browser.md | 16 +--------------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/browser/index.html b/browser/index.html index fc5a054e..e01ce17b 100644 --- a/browser/index.html +++ b/browser/index.html @@ -75,7 +75,7 @@ overflow-y: scroll; } - +

Bcoin, the browser full node

diff --git a/browser/src/app.js b/browser/src/app.js index 1d8a9f73..257ffa09 100644 --- a/browser/src/app.js +++ b/browser/src/app.js @@ -95,8 +95,7 @@ function show(obj) { floating.style.display = 'block'; return; } - const json = obj && obj.toJSON ? obj.toJSON() : null; - floating.innerHTML = escape(JSON.stringify(json, null, 2)); + floating.innerHTML = escape(JSON.stringify(obj, null, 2)); floating.style.display = 'block'; } diff --git a/docs/Running-in-the-browser.md b/docs/Running-in-the-browser.md index 0e3a525d..36887a7a 100644 --- a/docs/Running-in-the-browser.md +++ b/docs/Running-in-the-browser.md @@ -1,16 +1,2 @@ -Because bcoin is written in node.js, it is capable of being browserified. +This page has been moved to [https://bcoin.io/guides/browser.html](https://bcoin.io/guides/browser.html) -## Running a full node in the browser - -``` bash -$ cd ~/bcoin -$ make # Browserify bcoin -$ node browser/server.js 8080 # Start up a simple webserver and websocket->tcp bridge -$ chromium http://localhost:8080 -``` - -You should see something like this: http://i.imgur.com/0pWySyZ.png - -This is a simple proof-of-concept. It's not a pretty interface. I hope to see -others doing something far more interesting. A browser extension may be better: -the chrome extension API exposes raw TCP access. \ No newline at end of file