Answer the question
In order to leave comments, you need to log in
How to get started with node&react?
At first.
I write: npm init (basic package.json is created)
I install express.js, deploy the server, do routing - everything works.
How do I deploy react?
I write: npm i -g create-react-app
I write: create-react-app client
I write: cd client
I
write: npm start
?! Is the project with react and should it be in a separate folder? (it seems that one project turned out in another ...)
Or am I using it wrong? How can I screw it on correctly, taking into account the fact that the server has already been deployed on express.
Or should I start by creating a react project and then deploy the server?
Thanks in advance for helpful replies.
Structure:
/app - node js project
/app/client - react js project
Answer the question
In order to leave comments, you need to log in
Yes, these are two different projects. The first is the frontend (with its own server, where it takes the data that it then shows), and the second is the backend, which your frontend will later access.
Later (when there is a productive server) they will need to be combined. That is, the backend will also give files (pictures, css, etc.) and respond to front requests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question