explain why sirv is in prod dependencies

This commit is contained in:
Rich Harris 2019-11-15 17:31:17 -05:00
parent 5229054439
commit 58679be7a6

View file

@ -36,6 +36,17 @@ Navigate to [localhost:5000](http://localhost:5000). You should see your app run
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
## Building and running in production mode
To create an optimised version of the app:
```bash
npm run build
```
You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work on platforms that follow the `npm run build`/`npm run start` convention, like [now](https://zeit.co/now).
## Deploying to the web
### With [now](https://zeit.co/now)