Skip to content

Commit b16f6c4

Browse files
elbomangaearon
authored andcommitted
Add Surge.sh to deploy instructions (facebook#379)
* Add Surge.sh to deploy instructions * Add it also to the Table of Contents
1 parent 10b0b40 commit b16f6c4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

template/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
2424
- [Deployment](#deployment)
2525
- [Now](#now)
2626
- [Heroku](#heroku)
27+
- [Surge](#surge)
2728
- [GitHub Pages](#github-pages)
2829
- [Something Missing?](#something-missing)
2930

@@ -519,6 +520,27 @@ See [this example](https://github.com/xkawi/create-react-app-now) for a zero-con
519520
520521
Use the [Heroku Buildpack for create-react-app](https://github.com/mars/create-react-app-buildpack).
521522
523+
### Surge
524+
525+
Install the Surge CLI if you haven't already by running `npm install -g surge`. Run the `surge` command and log in you or create a new account. You just need to specify the *build* folder and your custom domain, and you are done.
526+
527+
```sh
528+
email: email@domain.com
529+
password: ********
530+
project path: /path/to/project/build
531+
size: 7 files, 1.8 MB
532+
domain: create-react-app.surge.sh
533+
upload: [====================] 100%, eta: 0.0s
534+
propagate on CDN: [====================] 100%
535+
plan: Free
536+
users: email@domain.com
537+
IP Address: X.X.X.X
538+
539+
Success! Project is published and running at create-react-app.surge.sh
540+
```
541+
542+
Note that in order to support routers that use html5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing).
543+
522544
### GitHub Pages
523545
524546
>Note: this feature is available with `react-scripts@0.2.0` and higher.

0 commit comments

Comments
 (0)