I have been able to create a production build for a front-end React app by simply typing ‘npm build’ in Git Bash, which would create a build folder I could deploy on GCP for my website.
Recently I’ve completed the full stack app from the X-press project on Codecademy (a React front-end and a back-end using express.js and SQL) which works on my computer when I run it on localhost. However, when I follow the same procedure to create a production build and deploy it the result is a working front-end but my server.js does not seem to be doing anything.
How do I create a production build that includes React, Express, and SQL? Should they have separate package.json files? Do I need to build them separately? Cannot find a solution where ever I look.