Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build production on create-react-app ? #432

Closed
ceck95 opened this issue Aug 13, 2016 · 8 comments
Closed

Build production on create-react-app ? #432

ceck95 opened this issue Aug 13, 2016 · 8 comments

Comments

@ceck95
Copy link

ceck95 commented Aug 13, 2016

hello all,
i have answer.
how to build create-app-react on production ?
tks for see.

@meznaric
Copy link

Did you even read the README.md?

https://github.com/facebookincubator/create-react-app#npm-run-build

@ceck95
Copy link
Author

ceck95 commented Aug 13, 2016

i was read, npm run build compeleted , how to run folder build ? tks for answer.

@mxstbr
Copy link
Contributor

mxstbr commented Aug 13, 2016

You have to upload the build folder to your web server, or deploy it to one of the services we have guides for: https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#deployment

@mxstbr mxstbr closed this as completed Aug 13, 2016
@gaearon
Copy link
Contributor

gaearon commented Aug 13, 2016

I believe the tool should print instructions right after build, does it not?

For example:

npm install -g pushstate-server
pushstate-server build

And then you can open localhost:9000 to see the production version. Those files in the build folder are ready to be deployed.

If you need to deploy to a non-root location (like GH Pages) you will need to specify homepage in package.json before building.

@ceck95
Copy link
Author

ceck95 commented Aug 13, 2016

tks for all. i do it.

@kopax
Copy link

kopax commented Apr 12, 2018

@gaearon that confuse me, my cra cli is telling me to install serve not pushstate-server, why would you want to install a different ?

@kopax
Copy link

kopax commented Apr 13, 2018

What's the difference between the recommended by facebook serve and the recommended one @gaearon pushstate-server ?

@iansu
Copy link
Contributor

iansu commented Apr 13, 2018

I believe pushstate-server was the previously recommended solution. We now recommend serve instead so you should use that.

This issue is almost 2 years old which is why the information is out of date. Please avoid commenting in old, closed issues.

@facebook facebook locked and limited conversation to collaborators Apr 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants