A code template to connectreact.js
file to existingnode.js
application. Creating react files in separate react folder.
Accessing static files which are created byparcel
indist
folder usingexpress.static
method.
Runnpm install
it will installnpm
in your project
Runnpm init
it will initializenpm
Usingnpm
installexpress.js
Create new folder to write react code
Cd to react folder
Runnpm i react react-dom
it will install react and react-dom dependencies
Write code
Run the codenpx parcel index.html
Cd back to root folder -> run the codenode server.js
The code will run inhttp://localhost:3000/