Skip to content

Commit 943e024

Browse files
committed
More friendly README
1 parent 5cc0126 commit 943e024

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
# webpack-dev-server
22

3-
**THIS SERVER SHOULD BE USED FOR DEVELOPMENT ONLY!**
3+
Use [webpack](http://webpack.github.io) with a development server that provides live reloading. This should be used for **development only**.
44

5-
**DO NOT USE IT IN PRODUCTION!**
5+
It uses [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) under the hood, which provides fast in-memory access to the webpack assets.
66

7-
It's a live reloading server for [webpack](http://webpack.github.io).
7+
## Installation
88

9-
# [Documentation](http://webpack.github.io/docs/webpack-dev-server.html)
9+
```
10+
npm install webpack-dev-server --save-dev
11+
```
12+
13+
## Getting started
14+
15+
The easiest way to use it is with the CLI. In the directory where your `webpack.config.js` is, run:
16+
17+
```
18+
node_modules/.bin/webpack-dev-server
19+
```
20+
21+
This will start a server, listening on connections from `localhost` on port `8080`.
22+
23+
Now, when you change something in your assets, it should live-reload the files.
24+
25+
See [**the documentation**](http://webpack.github.io/docs/webpack-dev-server.html) for more use cases and options.
1026

1127
## Inspiration
1228

@@ -20,7 +36,7 @@ Run the relevant [examples](https://github.com/webpack/webpack-dev-server/tree/m
2036

2137
When making a PR, keep these goals in mind:
2238

23-
- The communication library (Sock.js) should not be exposed to the user.
39+
- The communication library (`SockJS`) should not be exposed to the user.
2440
- A user should not try to implement stuff that accesses the webpack filesystem, because this lead to bugs (the middleware does it while blocking requests until the compilation has finished, the blocking is important).
2541
- It should be a development only tool (compiling in production is bad, one should precompile and deliver the compiled assets).
2642
- There are hooks to add your own features, so we should not add less-common features.

0 commit comments

Comments
 (0)