Local Tunneling
To see your local code running inside the Workrock OS, the Workrock host needs to be able to reach your machine. We use a secure tunneling mechanism to make this happen.
How it works
Section titled “How it works”- Local Server: You start your app normally (e.g.,
npm run devon port 3000). - CLI Tunnel: You run
workrock dev. - URL Mapping: The CLI creates a unique URL:
https://[your-client-id].workrock.in. - Traffic Proxy: Traffic hitting the
.workrock.inURL is securely proxied to yourlocalhost:3000. - CORS & SSL: Our tunnel handles SSL certificates and CORS headers automatically, so your app works perfectly within the HTTPS Workrock environment.
Benefits
Section titled “Benefits”- No Deployment Needed: Test live code changes instantly.
- Secure: Only your specific sandbox organization is routed to your tunnel.
- Native Experience: Test hardware integration (camera, etc.) that requires a secure context (HTTPS).
Troubleshooting
Section titled “Troubleshooting”If your app isn’t loading:
- Ensure your local server is actually running on the port specified in
workrock dev. - Check that you have an active internet connection.
- Verify that you have selected the correct Sandbox using
workrock sandbox.