From 58679be7a6807fe9e4cb1d279b7b60185744ad14 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 15 Nov 2019 17:31:17 -0500 Subject: [PATCH] explain why sirv is in prod dependencies --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 5adce8b..3f8c3ea 100644 --- a/README.md +++ b/README.md @@ -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)