简体   繁体   中英

How do I upload my react app to a web host?

I have created a react js app which works fine when I run it on local server:3000. I need to run it from the web, have signed up to Heroku, but am now not sure how to do this...

Please help.

An alternative from heroku: Netlify. You can create a github repository, push your project in there, then create an account in netlify and upload your project directly from your repository. This is by far the easiest option.

You can use

npm run build

which will create the build files in the build directory. after that, you can upload the files from the build directory to Heroku / any hosting sites.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM