@qi-mobile/miniapp-tunnel-client
v1.1.4
Published
## Overview
Readme
MiniApp Tunnel Client
Overview
MiniApp Tunnel Client is a command-line tool that creates tunnels to expose your local development servers (running on localhost) to the internet. It's perfect for testing MiniApp locally.
Installation
Via npm (global)
npm install -g @qi-mobile/miniapp-tunnel-clientVia pnpm (global)
pnpm install -g @qi-mobile/miniapp-tunnel-clientVia bun (global)
bun install -g @qi-mobile/miniapp-tunnel-clientYou can now use the miniapp-tunnel command to create tunnels to your local development servers.
Usage
miniapp-tunnel login
Authenticate with Miniapp Tunnel Server.
miniapp-tunnel loginYou'll be prompted to enter:
- Password (hidden input)
miniapp-tunnel tunnel <port> [options]
Create a tunnel to expose a local development server.
miniapp-tunnel tunnel <port>Arguments:
<port>- The local port number to tunnel (required)
Options:
--sub <subdomain>- Request a custom subdomain (e.g.,myapp)
Examples:
# Tunnel port 3000 with a random subdomain
miniapp-tunnel tunnel 3000After running the command, you will be able to access your local development server at https://<subdomain>.miniapp-proxy.cc'
# Tunnel port 8080 with a custom subdomain
miniapp-tunnel tunnel 8080 --sub myappAfter running the command, you will be able to access your local development server at https://myapp.miniapp-proxy.cc
miniapp-tunnel list
List all tunnels.
miniapp-tunnel listminiapp-tunnel delete <subdomain>
Delete a tunnel.
miniapp-tunnel delete <subdomain>miniapp-tunnel restart <subdomain>
Restart a tunnel.
miniapp-tunnel restart <subdomain>miniapp-tunnel whoami
Show the current user.
miniapp-tunnel whoamiminiapp-tunnel logout
Logout from Miniapp Tunnel Server.
miniapp-tunnel logoutminiapp-tunnel version
Show the current version.
miniapp-tunnel versionminiapp-tunnel help
Show the help message.
miniapp-tunnel helpTroubleshooting
"Not logged in" error
Make sure you've run miniapp-tunnel login before creating a tunnel:
Important Notes
- Make sure to run the development server with a
--hostflag to make it accessible from the internet. - Stale tunnels are automatically closed after a set period of time of inactivity, feel free to restart it if you need to.
