Hi Guys!
I am relatively new to Go, and have been working on building a simple web app using Golang as backend and React as frontend
I am having trouble compiling + deploying everything on a live server. Would be extremely grateful if you could point me in the right direction on this.
The steps I have followed are as follows:
- Compiled Golang app into a linux executable + uploaded to public_html in cpanel
- Added website name to package.json file
- Ran the
npm run build
to produce a build folder - Uploaded and unzipped contents of build folder inside public_html
- Ran the golang executable on console of cpanel with
PORT=1234 ./app-name
The static front end displays fine and the app runs on the server console just fine - but it seems to have trouble relaying any data between backend and frontend.
Thank you very much!