Use Chii and Caddy to add remove DevTool feature to your site.
Features:
- Debug browsers where can run normal DevTool, eg: webview, customer's device
- Add auth to protect target site
Default code use below ports of services, you can use environment to override value:
Site | Env variable | Default value |
---|---|---|
Caddy site | CADDY_PORT |
4545 |
Chii port | CHII_PORT |
8080 |
Target site | TARGET_SITE_PORT |
3000 |
Config
Config your site to include Chii script:
<script src="/chii/target.js"></script>
Run your site
npm run dev
npm run start
./chii.sh
./start.sh
Open target site which served by Caddy on browser, eg: http://localhost:4545
Open Chii's dashboard and inspect your site, example: http://localhost:8080
You can use ngrok to serve your site, just point to Caddy's url, example:
ngrok http [caddy's port]
# example
ngrok http 4545
- Open site in private tag can lead to site can connect but cant send request to Chii
- Request routing over many middle layer, so site can be slow
If you use Tmux and Tmuxp, then can use .tmuxp.yml to quick serve session.
Copy Tmuxp config
# To config's folder
wget https://raw.githubusercontent.com/madnh/remove-devtool/master/.tmuxp.yml -O ~/.tmuxp/remote-devtool.yaml
# to your project
wget https://raw.githubusercontent.com/madnh/remove-devtool/master/.tmuxp.yml -O ./remote-devtool.yaml
Load Tmuxp config
tmuxp load ./remote-devtool.yml