Skip to content

Commit 6a677a6

Browse files
authored
Update README.md
1 parent 164e7e7 commit 6a677a6

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
[![npm](https://img.shields.io/npm/v/http-server.svg?style=flat-square)](https://www.npmjs.com/package/http-server) [![homebrew](https://img.shields.io/homebrew/v/http-server?style=flat-square)](https://formulae.brew.sh/formula/http-server) [![npm downloads](https://img.shields.io/npm/dm/http-server?color=blue&label=npm%20downloads&style=flat-square)](https://www.npmjs.com/package/http-server)
33
[![license](https://img.shields.io/github/license/http-party/http-server.svg?style=flat-square)](https://github.com/http-party/http-server)
44

5-
# http-server: a command-line http server
5+
# http-server: a simple static HTTP server
66

7-
`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.
88

99
![Example of running http-server](https://github.com/http-party/http-server/raw/master/screenshots/public.png)
1010

1111
## Installation:
1212

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+
1319
#### Globally via `npm`
1420

1521
npm install --global http-server
@@ -19,12 +25,6 @@ This will install `http-server` globally so that it may be run from the command
1925
#### Globally via Homebrew
2026

2127
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]
2828
2929
#### As a dependency in your `npm` package:
3030

@@ -106,10 +106,21 @@ This is what should be output if successful:
106106

107107
``` sh
108108
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+
109120
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
113124
Hit CTRL-C to stop the server
114125
```
115126

@@ -119,7 +130,7 @@ Checkout this repository locally, then:
119130

120131
```sh
121132
$ npm i
122-
$ node bin/http-server
133+
$ npm start
123134
```
124135

125136
*Now you can visit http://localhost:8080 to view your server*

0 commit comments

Comments
 (0)