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
`http-server` is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.
7
+
`http-server` is a simple, zero-configuration command-line static HTTP server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development and learning.
8
8
9
9

10
10
11
11
## Installation:
12
12
13
+
#### Running on-demand:
14
+
15
+
Using `npx` you can run the script without installing it first:
16
+
17
+
npx http-server [path] [options]
18
+
13
19
#### Globally via `npm`
14
20
15
21
npm install --global http-server
@@ -19,12 +25,6 @@ This will install `http-server` globally so that it may be run from the command
19
25
#### Globally via Homebrew
20
26
21
27
brew install http-server
22
-
23
-
#### Running on-demand:
24
-
25
-
Using `npx` you can run the script without installing it first:
26
-
27
-
npx http-server [path] [options]
28
28
29
29
#### As a dependency in your `npm` package:
30
30
@@ -106,10 +106,21 @@ This is what should be output if successful:
106
106
107
107
```sh
108
108
Starting up http-server, serving ./ through https
109
+
110
+
http-server settings:
111
+
CORS: disabled
112
+
Cache: 3600 seconds
113
+
Connection Timeout: 120 seconds
114
+
Directory Listings: visible
115
+
AutoIndex: visible
116
+
Serve GZIP Files: false
117
+
Serve Brotli Files: false
118
+
Default File Extension: none
119
+
109
120
Available on:
110
-
https:127.0.0.1:8080
111
-
https:192.168.1.101:8080
112
-
https:192.168.1.104:8080
121
+
https://127.0.0.1:8080
122
+
https://192.168.1.101:8080
123
+
https://192.168.1.104:8080
113
124
Hit CTRL-C to stop the server
114
125
```
115
126
@@ -119,7 +130,7 @@ Checkout this repository locally, then:
119
130
120
131
```sh
121
132
$ npm i
122
-
$ node bin/http-server
133
+
$ npm start
123
134
```
124
135
125
136
*Now you can visit http://localhost:8080 to view your server*
0 commit comments