Connecting the Node.Js Express backend to the React frontend
P粉310931198
P粉310931198 2024-04-01 10:46:08
0
1
432

I want to merge two projects: one for React frontend and another for NodeJs Express backend. I'm using Android Studio to preview my front-end application on the mobile emulator. I'm not sure if you have any ideas on how to make everything work together.

I first copied the frontend project and placed it in the root directory of the backend project. I then set a variable in the package.json file to be able to start the frontend from the backend ("client": "cd my_frontend_project && npm start"). As for next steps, I'm lost and I really don't know what to do. Should I create one file to initiate this connection or multiple files since I know my project contains multiple pages/functions and how do I set up this connection?

P粉310931198
P粉310931198

reply all(1)
P粉330232096
  1. First you need to start the backend, if the backend is not implemented, you should implement Cors, (this is a middleware)
  2. You need to use postman to test the API
  3. Finish
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template