From 0f7d6790c383e8f57f7566d6ec2570f0b98bad16 Mon Sep 17 00:00:00 2001 From: David Ascher <david.ascher@gmail.com> Date: Sun, 30 Apr 2017 14:26:00 -0700 Subject: [PATCH 1/2] Fix instructions for serving with now Not sure if new, but the `--single` flag is now important. --- packages/react-scripts/template/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index da55a2e58..ea0d010ff 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1537,10 +1537,10 @@ When you build the project, Create React App will place the `public` folder cont 2. Install `serve` by running `npm install --save serve`. -3. Add this line to `scripts` in `package.json`: +3. Add this line to `scripts` in `package.json` (note the `--single` option which tells `serve` this is a single-page-app): ``` - "now-start": "serve build/", + "now-start": "serve --single build/", ``` 4. Run `now` from your project directory. You will see a **now.sh** URL in your output like this: -- GitLab From 2399283cf1859066bac3f891da09aaf7f46aa283 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Tue, 2 May 2017 19:23:35 +0100 Subject: [PATCH 2/2] Keep it shorter --- packages/react-scripts/template/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index ea0d010ff..2f1835ab2 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1537,10 +1537,10 @@ When you build the project, Create React App will place the `public` folder cont 2. Install `serve` by running `npm install --save serve`. -3. Add this line to `scripts` in `package.json` (note the `--single` option which tells `serve` this is a single-page-app): +3. Add this line to `scripts` in `package.json`: ``` - "now-start": "serve --single build/", + "now-start": "serve -s build/", ``` 4. Run `now` from your project directory. You will see a **now.sh** URL in your output like this: -- GitLab