This demo's code demonstrates how to write a dev tool proxy that works with the WebF RemoteDevServerService. This allows you to let Chrome DevTools connect to your own service without worrying about the IP address of your WebF App.
It's dangerous to deploy a dev tool service without any Security check.
Don't use this demo directly in real productions.
node server
- The WebSocket server for WebF Client will be listening at
ws://127.0.0.1:8090
. - The WebSocket server for Chrome DevTools will be listening at
ws://127.0.0.1:8091
.
WebF(
devToolsService: RemoteDevServerService('ws://127.0.0.1:8090'),
bundle: WebFBundle.fromUrl('assets:assets/bundle.html'),
)
Use your chrome to open the following url.
devtools://devtools/bundled/inspector.html?ws=127.0.0.1:8091
The DevTools works.
docker build --platform linux/amd64 -t devtool-proxy:0.3 .