r/learnreactjs • • May 25 '20

Question How to deploy create-react-app with express?

Hello! I have two folders. In one folder, there is create-react-app having all my frontend and in another folder I have my express server with database connectivity i.e. backend. I want to deploy this to vps or hosting service? So should I keep my code like this in two different folders and run the two apps on vps or should I use nextJs so that I can keep all code into single file?

9 Upvotes

4 comments sorted by

View all comments

2

u/O-juice89 May 25 '20

If you’re familiar with AWS Amplify, you can load up your whole git repository, and then it’s a matter of setting some build time scripts which tell Amplify which path your front end and back end are in and it’ll do the rest.

Can be a bit to digest at first but it’s a breeze once you understand it :)