A small single-page tool for testing your web project on a phone before you build it into an app with html2app.dev. Start a live server on your computer, then enter its address in the developer app on your phone to see your project running there, with live reload and remote logs.
The main advantage of this developer app is that you can configure your app on html2app.dev the way you want and add plugins. Once the plugins are in the app, you can interact with them and debug them directly on your local machine, with automatic reload. You do not need to build a new app in the cloud after each change. This saves a large amount of time.
- A code editor, such as VS Code or any editor you like.
- Node.js (LTS version recommended). Download it from nodejs.org. The
npxcommand is included with it. - A computer and a phone on the same local network. Use the same home or office Wi-Fi for both. Guest networks often block devices from reaching each other.
-
Open your project folder in your editor. If
index.htmlis in the top level of the folder, run:npx -y five-server@latest --host=0.0.0.0 --remoteLogs=true
-
If
index.htmlis inside a subfolder such aswww, set that folder as the root:npx -y five-server@latest --root=www --host=0.0.0.0 --remoteLogs=true
-
The terminal prints a local URL (usually
http://localhost:5500) and a network URL (for examplehttp://192.168.1.20:5500). Open the network URL on your computer or phone to check your site. -
Open the developer app on your phone. Enter the network address from step 3 (for example
192.168.1.20:5500) and connect.
Press Ctrl+C in the terminal to stop the server.
| Option | Purpose |
|---|---|
-y |
Lets npx install five-server without asking for confirmation. |
five-server@latest |
Always runs the newest published version. |
--root=www |
Serves the given folder instead of the current one. Only needed when index.html is not at the top level. |
--host=0.0.0.0 |
Lets other devices on your network connect. Without it, only your computer can. |
--remoteLogs=true |
Shows console output from your phone or browser in the terminal. |
- Use it on a trusted network only.
--host=0.0.0.0makes your project files reachable by every device on the same network. - Firewall prompts. On first run, your operating system may ask whether to allow Node.js to accept incoming connections. Allow it on private networks. If the phone still cannot connect, check that the firewall is not blocking port 5500.
- Use the printed address. Always copy the network URL from the terminal, since the port can differ from 5500.
- Hidden files. Files starting with a dot, such as
.env, are not served by default.
- Zip your project folder, or download the source code as a ZIP from the GitHub repository. Click <> Code, then Download ZIP.
- Upload the ZIP to html2app.dev.
- On the Plugins page, click Add New Plugin, select the plugins you need, and configure them if needed. Many plugins are available.
- Build the app and follow the instructions on the site.
The project already includes a ready-made app icon, icon.png. You can use it as the app icon or replace it with your own. Using it is optional.
index.html: the developer app page. It loadsstyles.cssandapp.js.styles.css: the styles for the developer app.app.js: the JavaScript for the developer app.
No build step is needed. Keep the three files together in the same folder.