Node JS Express for backend and React JS for interface

I got the server code in Node JS Express and I have a response in the form of JSON. I completed the following guide to setting up the project structure in Node JS Express: https://www.youtube.com/watch?v=65a5QQ3ZR2g&list=PL55RiY5tL51oGJorjEgl6NVeDbx_fO5jR

Now I want to make the front end for the same application in React. So here is what I mean: my server is in Node JS Express, and the front end should be in React. Given a newbie to React, please offer me some lessons or examples where I can at least start creating my own user interface and fit it into the project structure created with Node JS Express.

I tried to find it myself, but in each React JS application it creates its own server, but my server works in Node JS express. Please guide.

Please click this link to see my Node project structure.

+4
source share
3 answers

I suggest using create-react-app . This is a cli, so you do not need to configure the project yourself from scratch. They also have some guides that you can get started.

Meteor JS can easily solve your problems, and this is a good starting point for you.

(--), , . REST.

+2

MERN (Mongo, express, response, node).

http://mern.io/

github https://github.com/Hashnode/mern-starter

0

- create-Reaction-app. GitHub, , . : https://github.com/facebook/create-react-app.

After you cloned the project, you can create a folder called server in your root path and copy the nodejs / express code into it. You can create REST API endpoints in your backend and click on them from the front end using axios. This way you can easily get a response from the backend to the web interface. Please click on the following link to learn of Axios: https://www.npmjs.com/package/axios.

0
source

Source: https://habr.com/ru/post/1679699/


All Articles