gohere 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -53,6 +53,14 @@ Run multiple server scripts:
|
|
|
53
53
|
gohere dev:web dev:api
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
When one `gohere` run starts multiple services, each service can discover the others through env vars. For example, a web dev server can proxy API requests to a worker without hardcoding a port:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
target: process.env.GOHERE_WORKER_URL
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Use `GOHERE_<NAME>_URL` for app config. `GOHERE_<NAME>_PORT`, `GOHERE_<NAME>_TARGET`, and `GOHERE_SERVICES_JSON` are also available when multiple managed services start together. `PORT` and `TARGET` are advanced values and are only set when `gohere` controls that service port.
|
|
63
|
+
|
|
56
64
|
Run any current package script exactly as written by naming it explicitly:
|
|
57
65
|
|
|
58
66
|
```bash
|
|
@@ -61,6 +69,19 @@ gohere build
|
|
|
61
69
|
gohere preview
|
|
62
70
|
```
|
|
63
71
|
|
|
72
|
+
Run an explicit filesystem target:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
gohere ./dist
|
|
76
|
+
gohere ./apps/web
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Auto-refresh static pages while editing:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
gohere --live
|
|
83
|
+
```
|
|
84
|
+
|
|
64
85
|
Run a raw command:
|
|
65
86
|
|
|
66
87
|
```bash
|
|
@@ -79,6 +100,12 @@ Route to a known target port:
|
|
|
79
100
|
gohere --target 5173 -- npm run dev
|
|
80
101
|
```
|
|
81
102
|
|
|
103
|
+
Use a custom port flag for tools that do not use `--port`:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
gohere --port-flag --local-port dev
|
|
107
|
+
```
|
|
108
|
+
|
|
82
109
|
Open the project URL in your browser:
|
|
83
110
|
|
|
84
111
|
```bash
|
|
@@ -94,7 +121,8 @@ CSS, images, and scripts are served normally.
|
|
|
94
121
|
```text
|
|
95
122
|
myproject -> http://myproject.localhost
|
|
96
123
|
@scope/web -> http://web.localhost
|
|
97
|
-
|
|
124
|
+
./apps/web -> http://web.repo.localhost
|
|
125
|
+
./dist -> http://dist.localhost
|
|
98
126
|
about.html -> http://myproject.localhost/about.html
|
|
99
127
|
```
|
|
100
128
|
|
|
@@ -103,7 +131,10 @@ about.html -> http://myproject.localhost/about.html
|
|
|
103
131
|
```bash
|
|
104
132
|
gohere list
|
|
105
133
|
gohere list --verbose
|
|
134
|
+
gohere list --json
|
|
106
135
|
gohere stop
|
|
136
|
+
gohere stop web
|
|
137
|
+
gohere stop --all
|
|
107
138
|
gohere prune
|
|
108
139
|
gohere doctor
|
|
109
140
|
gohere service stop
|
|
@@ -112,6 +143,10 @@ gohere uninstall
|
|
|
112
143
|
|
|
113
144
|
`gohere list --verbose` shows host, target, status, PID, and working directory.
|
|
114
145
|
|
|
146
|
+
`gohere list --json` returns the same route information in a stable machine-readable format.
|
|
147
|
+
|
|
148
|
+
`gohere stop` stops routes for the current folder. `gohere stop <target>` stops a listed route by host, short host label, route name, or project name. `gohere stop --all` stops safely controllable routes and skips unverified live routes.
|
|
149
|
+
|
|
115
150
|
Route status can be `ready`, `dead`, or `unknown`. `prune` removes only routes that are confidently dead.
|
|
116
151
|
|
|
117
152
|
## Service And Uninstall
|
|
@@ -133,29 +168,31 @@ npm uninstall -g gohere
|
|
|
133
168
|
|
|
134
169
|
## How it works
|
|
135
170
|
|
|
136
|
-
`gohere` runs
|
|
171
|
+
`gohere` runs one local service on HTTP port `80`.
|
|
137
172
|
|
|
138
173
|
Each project gets a hidden local port. The service maps the clean `.localhost` hostname to that port using the request `Host` header.
|
|
139
174
|
|
|
175
|
+
First-time setup installs the local service in `~/.gohere/` and starts it in the background. After that, `gohere` only starts your project and registers its route.
|
|
176
|
+
|
|
177
|
+
The service only serves local machine traffic. On macOS, gohere uses a port `80` listener that rejects non-loopback connections before requests reach the router.
|
|
178
|
+
|
|
140
179
|
State is stored in:
|
|
141
180
|
|
|
142
181
|
```text
|
|
143
182
|
~/.gohere/
|
|
144
183
|
```
|
|
145
184
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
On Windows, first-time setup starts the local service directly on `127.0.0.1:80`.
|
|
185
|
+
Linux may ask for one-time permission to bind port `80`.
|
|
149
186
|
|
|
150
187
|
When used from WSL, `gohere` reuses a running Windows service automatically.
|
|
151
188
|
|
|
152
189
|
## Platform support
|
|
153
190
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
191
|
+
- Linux / WSL
|
|
192
|
+
- Windows
|
|
193
|
+
- macOS (experimental)
|
|
157
194
|
|
|
158
|
-
The npm package
|
|
195
|
+
The npm package includes x64 and arm64 binaries for these platforms.
|
|
159
196
|
|
|
160
197
|
## Limits
|
|
161
198
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gohere",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Tiny local dev URL launcher for .localhost projects.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gohere": "bin/gohere.js"
|
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
],
|
|
26
26
|
"os": [
|
|
27
27
|
"linux",
|
|
28
|
-
"win32"
|
|
28
|
+
"win32",
|
|
29
|
+
"darwin"
|
|
29
30
|
],
|
|
30
31
|
"cpu": [
|
|
31
|
-
"x64"
|
|
32
|
+
"x64",
|
|
33
|
+
"arm64"
|
|
32
34
|
]
|
|
33
35
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/vendor/linux-x64/gohere
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|