diff --git a/browser/debug.html b/browser/debug.html new file mode 100644 index 00000000..8d30d348 --- /dev/null +++ b/browser/debug.html @@ -0,0 +1,11 @@ + + + + bcoin + + + +

Bcoin

+

Use the console to access `global.bcoin`.

+ + diff --git a/browser/server.js b/browser/server.js index cbedd736..42331f15 100644 --- a/browser/server.js +++ b/browser/server.js @@ -1,11 +1,12 @@ 'use strict'; +const fs = require('fs'); const HTTPBase = require('../lib/http/base'); const WSProxy = require('./wsproxy'); -const fs = require('fs'); const index = fs.readFileSync(`${__dirname}/index.html`); const indexjs = fs.readFileSync(`${__dirname}/index.js`); +const debug = fs.readFileSync(`${__dirname}/debug.html`); const bcoin = fs.readFileSync(`${__dirname}/bcoin.js`); const master = fs.readFileSync(`${__dirname}/bcoin-master.js`); const worker = fs.readFileSync(`${__dirname}/bcoin-worker.js`); @@ -40,6 +41,10 @@ server.get('/index.js', (req, res) => { res.send(200, indexjs, 'js'); }); +server.get('/debug', (req, res) => { + res.send(200, debug, 'html'); +}); + server.get('/bcoin.js', (req, res) => { res.send(200, bcoin, 'js'); });