rn-tunnel-cli
v1.2.9
Published
π **React Native Dev Tunnel** β A simple CLI tool to create an HTTP tunnel for debugging React Native apps in a bare workflow, similar to `expo start --tunnel`.
Downloads
27
Readme
react-native-dev-tunnel
π React Native Dev Tunnel β A simple CLI tool to create an HTTP tunnel for debugging React Native apps in a bare workflow, similar to expo start --tunnel.
π Features
- β Starts the Metro Bundler automatically
- β Creates a secure ngrok tunnel
- β Provides a public URL for debugging
- β Works with bare React Native projects
- β No need to connect a USB cable to run the app
π¦ Installation
Global Installation
npm install -g react-native-dev-tunnelProject-Specific Installation
npm install --save-dev react-native-dev-tunnelπ Usage
Start Tunnel
Run the following command inside your React Native project:
npx rn-tunnelWhat This Command Does
- β Starts Metro Bundler
- β Sets up an ngrok tunnel
- β Outputs a public URL you can use for debugging
- β Allows running the app without a physical USB connection
β‘ Example Output
π Starting Metro Bundler...
π Creating ngrok tunnel...
π Tunnel URL: https://abcd-1234.ngrok.io
π‘ Use this URL in your React Native app for debugging.π Configuration (Optional)
You can customize the tunnel settings by passing flags:
npx rn-tunnel --port 8081 --region us| Flag | Description |
| ---------- | ----------------------------------------- |
| --port | Specify a custom port (default: 8081) |
| --region | Set ngrok region (us, eu, ap, etc.) |
π οΈ Troubleshooting
Issue: ``?
If you get an error like command not found: ngrok, install ngrok globally:
npm install -g ngrokπ€ Contributing
Pull requests are welcome! If youβd like to contribute:
- Fork the repo
- Create a feature branch (
git checkout -b my-feature) - Commit your changes (
git commit -m 'Add feature') - Push to the branch (
git push origin my-feature) - Open a Pull Request
π License
This project is licensed under the MIT License β see the LICENSE file for details.
π Happy coding! π
