fix: updated docs
This commit is contained in:
Родитель
739f94d0d5
Коммит
bdbea088e7
|
@ -44,7 +44,7 @@ jacdac parse log.txt
|
||||||
|
|
||||||
### `jacdac devtools`
|
### `jacdac devtools`
|
||||||
|
|
||||||
Starts a websocket server that acts as a bridge between a web dashboard and a client implementation.
|
Starts websocket and native socket server that acts as a bridge between a web dashboard and a client implementation.
|
||||||
This allows to test a native client using the latest version of the web developer tools.
|
This allows to test a native client using the latest version of the web developer tools.
|
||||||
This command will work in [GitHub codespaces](https://github.com/features/codespaces).
|
This command will work in [GitHub codespaces](https://github.com/features/codespaces).
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,9 @@ export async function devToolsCommand(
|
||||||
log(` raw socket: tcp://localhost:${tcpPort}`)
|
log(` raw socket: tcp://localhost:${tcpPort}`)
|
||||||
|
|
||||||
// download proxy sources
|
// download proxy sources
|
||||||
//debug(`downloading proxy sources`)
|
|
||||||
const proxyHtml = await fetchProxy()
|
const proxyHtml = await fetchProxy()
|
||||||
|
|
||||||
// start http server
|
// start http server
|
||||||
//debug(`starting proxy web server`)
|
|
||||||
const clients: WebSocket[] = []
|
const clients: WebSocket[] = []
|
||||||
|
|
||||||
const server = http.createServer(function (req, res) {
|
const server = http.createServer(function (req, res) {
|
||||||
|
@ -86,7 +84,6 @@ export async function devToolsCommand(
|
||||||
|
|
||||||
// passive bus to sniff packets
|
// passive bus to sniff packets
|
||||||
const bridge = createProxyBridge((data, sender) => {
|
const bridge = createProxyBridge((data, sender) => {
|
||||||
//console.log(sender)
|
|
||||||
clients
|
clients
|
||||||
.filter(c => c[SENDER_FIELD] !== sender)
|
.filter(c => c[SENDER_FIELD] !== sender)
|
||||||
.forEach(c => c.send(Buffer.from(data)))
|
.forEach(c => c.send(Buffer.from(data)))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче