From 7257ffa61839350d03d62723f2f77dd543029948 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Thu, 8 Aug 2019 11:40:35 +0200 Subject: [PATCH 1/3] Adjusted deployment documentation for ZEIT Now --- docusaurus/docs/deployment.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md index 848b7aed750..c58d3b439e7 100644 --- a/docusaurus/docs/deployment.md +++ b/docusaurus/docs/deployment.md @@ -436,27 +436,35 @@ To support `pushState`, make sure to create a `public/_redirects` file with the When you build the project, Create React App will place the `public` folder contents into the build output. -## [Now](https://zeit.co/now) +## [ZEIT Now](https://zeit.co) -[Now](https://zeit.co/docs) offers a simple, single-command deployment. You can use `now` to deploy your app for free. +[ZEIT Now](https://zeit.co) is a cloud platform for websites and serverless APIs, that you can use to deploy your Create React App projects to your personal domain (or a free `.now.sh` suffixed URL). -The first step is to install Now. You can do this by installing [the Now Desktop app](https://zeit.co/download), which also installs Now CLI and keeps it up-to-date, or by [installing Now CLI](https://zeit.co/download#now-cli) directly with npm: +This guide will show you how to get started in a few quick steps: + +### Step 1: Installing Now CLI + +To install their command-line interface with [npm](https://www.npmjs.com/package/now), run the following command: ```shell npm i -g now ``` -To deploy your built project directly with Now CLI in your terminal, without any configuration: +### Step 2: Deploying + +You can deploy your application by running the following command in the root of the project directory: -1. Build your app by running `npm run build`. +```shell +now +``` -2. Move into the build directory by running `cd build`. +**Alternatively**, you can also use their integration [GitHub](https://zeit.co/github) or [GitLab](https://zeit.co/gitlab). -3. Run `now --name your-project-name` from within the build directory. You will be given a **now.sh** URL as a response as your build is deployed, similar to the following: https://my-cra-project-4rx7b16z3.now.sh/ +That’s all! -Click or paste the deployment URL into your browser when the build is complete and you will see your deployed app. +Your site will now deploy, and you will receive a link similar to the following: https://react.now-examples.now.sh -For more information on deploying React applications with Now, including automatically building your application fresh in the cloud, setting up routes to rewrite all paths to the index.html file, and setting up caching headers for speed, see [the ZEIT Guide for Deploying a React app with Create React App](https://zeit.co/guides/deploying-react-with-now-cra/). +Out of the box, you are already provided with the necessary routes for rewriting requests (except for custom static files) directly to your `index.html` file and the appropiate default caching headers. This behaviour can be overwritten [like this](https://zeit.co/docs/v2/advanced/routes/). ## [Render](https://render.com) From 4ec13ccdd8eb80f50f61b76ad0512aab759642f2 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Thu, 8 Aug 2019 11:42:25 +0200 Subject: [PATCH 2/3] Fixed missing word --- docusaurus/docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md index c58d3b439e7..f2dc3af569c 100644 --- a/docusaurus/docs/deployment.md +++ b/docusaurus/docs/deployment.md @@ -458,7 +458,7 @@ You can deploy your application by running the following command in the root of now ``` -**Alternatively**, you can also use their integration [GitHub](https://zeit.co/github) or [GitLab](https://zeit.co/gitlab). +**Alternatively**, you can also use their integration for [GitHub](https://zeit.co/github) or [GitLab](https://zeit.co/gitlab). That’s all! From 89fffec8cb29493413e3abc7c2d4fac5df258e3b Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Thu, 8 Aug 2019 20:23:23 +0200 Subject: [PATCH 3/3] Update docusaurus/docs/deployment.md Co-Authored-By: Joe Haddad --- docusaurus/docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md index f2dc3af569c..3c5a1a8bdff 100644 --- a/docusaurus/docs/deployment.md +++ b/docusaurus/docs/deployment.md @@ -464,7 +464,7 @@ That’s all! Your site will now deploy, and you will receive a link similar to the following: https://react.now-examples.now.sh -Out of the box, you are already provided with the necessary routes for rewriting requests (except for custom static files) directly to your `index.html` file and the appropiate default caching headers. This behaviour can be overwritten [like this](https://zeit.co/docs/v2/advanced/routes/). +Out of the box, you are preconfigured for client-side routing compatibility and appropriate default caching headers. This behaviour can be overwritten [like this](https://zeit.co/docs/v2/advanced/routes/). ## [Render](https://render.com)