moyo-expose
v0.0.4
Published
Expose local dev server on LAN, detect IP/port and print QR (works with Vite/Next/CRA).
Maintainers
Readme
moyo-expose
Expose your local development server on your LAN and instantly generate a QR code to open the app on your phone.
✅ Works with Next.js
✅ Works with Vite
✅ Auto-detects your local IP
✅ Generates a QR code in the terminal
✅ Zero configuration
📦 Installation
Global install (recommended)
npm install -g moyo-exposeNow you can run:
moyo-expose --nextor
moyo-expose --viteLocal project install
npm install moyo-expose --save-devThen add a script in package.json:
"scripts": {
"expose": "moyo-expose --next"
}Run it:
npm run expose🚀 Usage
For Next.js projects
moyo-expose --nextFor Vite projects
moyo-expose --vite✅ What it does
When you run the command:
- Detects an available port (default 3000)
- Finds your local network IP
- Starts your dev server
- Prints both local and LAN URLs
- Displays a QR code you can scan on your phone
Example output:
Local: http://localhost:3000
Network: http://192.168.0.45:3000
Scan this QR code to open the app on your phone:
▇▇▀▇▇█▄...✅ Why use this?
Perfect when developing on a laptop and testing the UI on:
- Android
- iPhone/iOS
- Tablets
- Multiple devices on the same Wi-Fi
No more manually typing IP addresses.
⚠️ Requirements
- Node 14+
- A Wi-Fi network (phone + computer must be on the same network)
🛠 Supported frameworks
| Framework | Status | | --------- | ------- | | Next.js | ✅ Works | | Vite | ✅ Works |
React Native support is planned.
📌 CLI Options
| Flag | Description |
| -------- | ------------------------ |
| --next | Start Next.js dev server |
| --vite | Start Vite dev server |
👤 Author
Anaclet Mwela Email: [email protected]
📄 License
MIT License Free to use, modify, and distribute.
Happy coding! 🚀
