hello all,
i have answer.
how to build create-app-react on production ?
tks for see.
Did you even read the README.md?
https://github.com/facebookincubator/create-react-app#npm-run-build
i was read, npm run build compeleted , how to run folder build ? tks for answer.
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
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.
tks for all. i do it.
@gaearon that confuse me, my cra cli is telling me to install serve
not pushstate-server
, why would you want to install a different ?
What's the difference between the recommended by facebook serve
and the recommended one @gaearon pushstate-server
?
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.
Most helpful comment
I believe the tool should print instructions right after build, does it not?
For example:
And then you can open
localhost:9000
to see the production version. Those files in thebuild
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
inpackage.json
before building.