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
{{ message }}
Repository navigation
Commit 3dc0988
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,22 @@ serve ~/myproj
22
22
```
23
23
-`sudo` may be necessary.
24
24
- If a static path is not provided the current directory content will be served.
25
-
- You can change the port setting the PORT environmental variable: `PORT=4433 serve ~/myproj`. Specifying port number will also prevent http to https redirect.
25
+
- You can change the **port** setting the `PORT` environmental variable: `PORT=4433 serve ~/myproj`. Specifying port number will also prevent http to https redirect.
26
+
27
+
### Binaries
28
+
If you don't have Node.js installed just use a packaged version! Download it from the [release page](https://github.com/daquinoaldo/https-localhost/releases).
29
+
```
30
+
// Linux
31
+
./https-localhost-linux ~/myproj
32
+
33
+
// MacOS
34
+
./https-localhost-macos ~/myproj
35
+
36
+
// Windows
37
+
./https-localhost-win.exe C:\User\me\myproj
38
+
```
39
+
**Tip 1:** on Windows just drag the folder on the executable to serve itV.
40
+
**Tip 2:** on all platform put the executable on the folder you want to serve and double-click it.
26
41
27
42
28
43
## Use as module
@@ -37,9 +52,12 @@ const app = httpLocalhost()
37
52
// app is an express app, do what you usually do with express
38
53
app.listen(port)
39
54
```
40
-
- If the port number is not provided, it will listen on 443.
41
-
- To redirect the http traffic to https use `app.redirect()`.
42
-
- You can serve static files with `app.serve(path)`.
55
+
- If the **port** number is not provided, it will listen on 443.
56
+
- To **redirect** the http traffic to https use `app.redirect()`.
57
+
- You can serve **static files** with `app.serve(path)`.
58
+
59
+
**Tip:** consider installing it as a dev dependency: this is not a production tool!
0 commit comments