Skip to content

Commit f1d2cd5

Browse files
elbomangaearon
authored andcommitted
Add Surge.sh to deploy instructions (#379)
* Add Surge.sh to deploy instructions * Add it also to the Table of Contents
1 parent 0030d68 commit f1d2cd5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

template/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
2222
- [Deployment](#deployment)
2323
- [Now](#now)
2424
- [Heroku](#heroku)
25+
- [Surge](#surge)
2526
- [GitHub Pages](#github-pages)
2627
- [Something Missing?](#something-missing)
2728

@@ -400,6 +401,27 @@ See [this example](https://github.com/xkawi/create-react-app-now) for a zero-con
400401
401402
Use the [Heroku Buildpack for create-react-app](https://github.com/mars/create-react-app-buildpack).
402403
404+
### Surge
405+
406+
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.
407+
408+
```sh
409+
email: email@domain.com
410+
password: ********
411+
project path: /path/to/project/build
412+
size: 7 files, 1.8 MB
413+
domain: create-react-app.surge.sh
414+
upload: [====================] 100%, eta: 0.0s
415+
propagate on CDN: [====================] 100%
416+
plan: Free
417+
users: email@domain.com
418+
IP Address: X.X.X.X
419+
420+
Success! Project is published and running at create-react-app.surge.sh
421+
```
422+
423+
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).
424+
403425
### GitHub Pages
404426
405427
>Note: this feature is available with `react-scripts@0.2.0` and higher.

0 commit comments

Comments
 (0)