You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ Use it when your dev server is running on a remote machine and you want to open
27
27
- Prints the HTTPS MagicDNS URL for the current Tailscale device.
28
28
- Supports an explicit `--port` when automatic detection is not possible.
29
29
- Supports `--tailscale-port` when you want the MagicDNS URL to include a specific HTTPS port.
30
+
- Detects Laravel + Vite dev output, exposes both servers, and rewrites Laravel's `public/hot` file to the Tailscale Vite URL.
30
31
31
32
## Requirements
32
33
@@ -102,7 +103,8 @@ lizardtail -- npm run dev -- --host 0.0.0.0
102
103
|`--port <port>`| auto-detect | Expose this port instead of reading one from command output. |
103
104
|`--host <host>`|`127.0.0.1`| Local host to pass to Tailscale Serve. |
104
105
|`--timeout <ms>`|`30000`| How long to wait for a port to appear in command output. |
105
-
|`--tailscale-port <port>`|`443`| Expose on this Tailscale HTTPS port and print it in the MagicDNS URL. Alias: `--https-port`. |
106
+
|`--tailscale-port <port>`|`443`| Expose the main app on this Tailscale HTTPS port and print it in the MagicDNS URL. Alias: `--https-port`. |
107
+
|`--vite-tailscale-port <port>`| first free `8443+`| Expose a detected Laravel Vite asset server on this Tailscale HTTPS port. Alias: `--vite-https-port`. |
106
108
|`--no-open-check`| enabled | Skip waiting for the local port to accept connections before calling Tailscale. |
Laravel development commands often start both the PHP app server and the Vite asset server. `lizardtail` prefers output from the app server when it can see both ports:
159
+
Laravel development commands often start both the PHP app server and the Vite asset server. When `lizardtail` sees both, it:
160
+
161
+
1. exposes the Laravel app server;
162
+
2. exposes the Vite asset server on a separate Tailscale HTTPS port;
163
+
3. writes `public/hot` to the Tailscale Vite URL so Laravel renders assets from the reachable Vite server.
158
164
159
165
```bash
160
166
lizardtail composer run dev
161
167
```
162
168
163
-
If your app server lands on a known port, you can force it:
169
+
You can choose the Vite Tailscale port explicitly:
164
170
165
171
```bash
166
-
lizardtail --port 8001 composer run dev
172
+
lizardtail --vite-tailscale-port 8453 composer run dev
167
173
```
168
174
169
-
If browser assets fail to load, the Vite server may also need to be exposed or your Laravel/Vite config may need to allow the Tailscale hostname.
175
+
`lizardtail` also sets `__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS` for the child command when it can read your Tailscale MagicDNS name. If browser assets still fail, your Vite config may also need CORS enabled, for example by running Vite with `--cors`.
176
+
177
+
If your app server lands on a known port and you only want to expose that server, you can force it:
0 commit comments