https://github.com/openwebf/remote-devtool-proxy-example
An example showing how to develop a devtool proxy service work with WebF RemoteDevServerService.
https://github.com/openwebf/remote-devtool-proxy-example
Last synced: about 1 year ago
JSON representation
An example showing how to develop a devtool proxy service work with WebF RemoteDevServerService.
- Host: GitHub
- URL: https://github.com/openwebf/remote-devtool-proxy-example
- Owner: openwebf
- Created: 2022-12-19T10:49:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-28T16:32:11.000Z (over 2 years ago)
- Last Synced: 2025-03-26T04:21:41.232Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 106 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
remote-devtool-proxy-example
---------------------
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.
## How to use
### 1. Start the server
```bash
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`.
### 2. On the WebF, Use `RemoteDevServerService` to connect to this server
```dart
WebF(
devToolsService: RemoteDevServerService('ws://127.0.0.1:8090'),
bundle: WebFBundle.fromUrl('assets:assets/bundle.html'),
)
```
### 3. Open your Chrome, and connect to the server
Use your chrome to open the following url.
```
devtools://devtools/bundled/inspector.html?ws=127.0.0.1:8091
```
### 4. Done
The DevTools works.

## Docker build
```shell
docker build --platform linux/amd64 -t devtool-proxy:0.3 .
```