my project consists of a react frontend and an express backend. It has the following hierarchy:
project\
- package.json
- server.js
- node_modules\
- client\
- package.json
- src\
- public\
- node_modules\
I know that running npm run build
inside the client
folder will run react-scripts build
(as stated in its package.json
) that will bundle all the client folder contents for deployment.
I have several questions regarding this:
- how do i do bundling like using
react-scripts start
but in theproject
folder? - is it ideal to have duplicates of
package.json
andnode_modules
, one forclient
and one forproject
folder?