Elijah's initial attempt did not work properly, as further investigation proved that changing the location of index.js inside a react app is a very big hassle. On top of that, separating package.js files is important to have node and react work independently.
I still could be wrong--so please correct me if you have better ideas--but this new directory configuration should work well at least for the time being!
I followed this video for the set up if you're interested:
Elijah's initial attempt did not work properly, as further investigation proved that changing the location of index.js inside a react app is a very big hassle. On top of that, separating package.js files is important to have node and react work independently.
I still could be wrong--so please correct me if you have better ideas--but this new directory configuration should work well at least for the time being!
I followed this video for the set up if you're interested:
https://www.youtube.com/watch?v=w3vs4a03y3I&ab_channel=ArpanNeupane
Needed Node.js modules that you need to install are express and nodemon using:
npm i express, nodemon -D