browser: add debug page.
This commit is contained in:
parent
8451fab965
commit
f4f5abefef
11
browser/debug.html
Normal file
11
browser/debug.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>bcoin</title>
|
||||
<script src="/bcoin.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Bcoin</h1>
|
||||
<p>Use the console to access `global.bcoin`.</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -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');
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user