docs
This commit is contained in:
32
doc/distribute.md
Normal file
32
doc/distribute.md
Normal file
@ -0,0 +1,32 @@
|
||||
## Distribute with your project
|
||||
The standard convention with client-server applications is to add an `npm start` command to launch the server component.
|
||||
|
||||
1\. Install the server as a dev dependency
|
||||
|
||||
```sh
|
||||
$ npm install local-web-server --save-dev
|
||||
```
|
||||
|
||||
2\. Add a `start` command to your `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "example",
|
||||
"version": "1.0.0",
|
||||
"local-web-server": {
|
||||
"port": 8100,
|
||||
"forbid": "*.json"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "ws"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3\. Document how to build and launch your site
|
||||
|
||||
```sh
|
||||
$ npm install
|
||||
$ npm start
|
||||
serving at http://localhost:8100
|
||||
```
|
Reference in New Issue
Block a user