gohere 0.6.0 → 0.7.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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Tiny local dev URL launcher for `.localhost` projects.
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
|
|
6
|
+
https://myproject.localhost
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run `gohere` inside a package project, workspace root, or static folder. It starts or serves the project on a hidden local port, routes a clean `.localhost` hostname to it, and prints the URL.
|
|
@@ -34,13 +34,15 @@ Run the default command:
|
|
|
34
34
|
gohere
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
In a package project, this runs the nearest `package.json` `dev` script. In a workspace root
|
|
37
|
+
In a package project, this runs the nearest `package.json` `dev` script. In a workspace root with child packages that have `dev` scripts, this starts each matching package and gives each package its own route:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
gohere web ->
|
|
41
|
-
gohere worker ->
|
|
40
|
+
gohere web -> https://web.myrepo.localhost
|
|
41
|
+
gohere worker -> https://worker.myrepo.localhost
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
If workspace metadata exists but no child package has a `dev` script, `gohere` falls back to the current package's `dev` script. If there is no package script and the folder has `index.html`, `gohere` serves it as a static site.
|
|
45
|
+
|
|
44
46
|
Run a named package script:
|
|
45
47
|
|
|
46
48
|
```bash
|
|
@@ -112,18 +114,18 @@ Open the project URL in your browser:
|
|
|
112
114
|
gohere --open
|
|
113
115
|
```
|
|
114
116
|
|
|
115
|
-
For static folders, `gohere` serves `index.html`. You can also open a specific file, for example `gohere about.html`, which routes to `
|
|
117
|
+
For static folders, `gohere` serves `index.html`. You can also open a specific file, for example `gohere about.html`, which routes to `https://myproject.localhost/about.html`.
|
|
116
118
|
|
|
117
119
|
CSS, images, and scripts are served normally.
|
|
118
120
|
|
|
119
121
|
## Examples
|
|
120
122
|
|
|
121
123
|
```text
|
|
122
|
-
myproject ->
|
|
123
|
-
@scope/web ->
|
|
124
|
-
./apps/web ->
|
|
125
|
-
./dist ->
|
|
126
|
-
about.html ->
|
|
124
|
+
myproject -> https://myproject.localhost
|
|
125
|
+
@scope/web -> https://web.localhost
|
|
126
|
+
./apps/web -> https://web.repo.localhost
|
|
127
|
+
./dist -> https://dist.localhost
|
|
128
|
+
about.html -> https://myproject.localhost/about.html
|
|
127
129
|
```
|
|
128
130
|
|
|
129
131
|
## Route management
|
|
@@ -168,11 +170,11 @@ npm uninstall -g gohere
|
|
|
168
170
|
|
|
169
171
|
## How it works
|
|
170
172
|
|
|
171
|
-
`gohere` runs one local service on HTTP port `80`.
|
|
173
|
+
`gohere` runs one local service on HTTP port `80` and HTTPS port `443`.
|
|
172
174
|
|
|
173
175
|
Each project gets a hidden local port. The service maps the clean `.localhost` hostname to that port using the request `Host` header.
|
|
174
176
|
|
|
175
|
-
First-time setup installs the local service in `~/.gohere
|
|
177
|
+
First-time setup installs the local service in `~/.gohere/`, installs a local trusted certificate authority, and starts the service in the background. After that, `gohere` only starts your project and registers its route.
|
|
176
178
|
|
|
177
179
|
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
180
|
|
|
@@ -182,7 +184,7 @@ State is stored in:
|
|
|
182
184
|
~/.gohere/
|
|
183
185
|
```
|
|
184
186
|
|
|
185
|
-
Linux may ask for one-time permission to bind
|
|
187
|
+
Linux may ask for one-time permission to bind local ports and trust the local certificate authority.
|
|
186
188
|
|
|
187
189
|
When used from WSL, `gohere` reuses a running Windows service automatically.
|
|
188
190
|
|
|
@@ -196,9 +198,9 @@ The npm package includes x64 and arm64 binaries for these platforms.
|
|
|
196
198
|
|
|
197
199
|
## Limits
|
|
198
200
|
|
|
199
|
-
- HTTP only
|
|
200
201
|
- `.localhost` only
|
|
201
|
-
-
|
|
202
|
+
- HTTPS uses a local trusted certificate authority
|
|
203
|
+
- HTTP remains available with `--http`
|
|
202
204
|
- no LAN sharing
|
|
203
205
|
- no custom TLDs
|
|
204
206
|
- no project config files
|
package/package.json
CHANGED
|
Binary file
|
package/vendor/darwin-x64/gohere
CHANGED
|
Binary file
|
|
Binary file
|
package/vendor/linux-x64/gohere
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|