Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosting react app on godaddy

I bought domain and cheapest hosting on GoDaddy, but have no idea how to upload my react app to cPanel.

Uploading simple index.html into public_html works, but I haven't yet found how to proceed with react app.

Here is the project that I want to upload.

In case what I am asking is not possible, I would appreciate any other recommendations on how to get my react app going on domain I just bought.

Thanks in advance!

like image 470
akirtovskis Avatar asked Jun 25 '18 14:06

akirtovskis


1 Answers

According to your projects package.json file, the production build command is build:prod. So if you are using npm run: npm run build:prod or if using yarn yarn build:prod.

Then your webpack.config.js states that the output production javascript bundle.js file will be in public/dist/. So you need to upload the public folder AFTER running the command above to produce bundle.js. Make sure that you keep file and folder structure the same when uploading the contents public folder.

like image 92
Evans Avatar answered Oct 12 '22 08:10

Evans