Answer the question
In order to leave comments, you need to log in
webstorm react. Where is the server part?
I created the project with the create new react app projectt buttons and run it with the npm start command.
When I try to create a mysql connection, I get errors, when I google it, it turns out that this is due to the fact that I add the connection to the "client" javascript, but it should be on the "server".
You can easily understand where the server code is if you create an application in the storm with the new node express project command, there is a path in package.json that leads to the app.js file, there is no such thing in the react project, but there should be something similar. Where can I find the server node javascript?
Answer the question
In order to leave comments, you need to log in
there is no such thing in a react project, but there should be something similar. Where can I find the server node javascript?
React has already been written about the essence of the problem - this is not about the server part, to simulate the server part I can advise mockapi , look at next or just create a project with the express server part.
if you create an application in a storm with the new node express project command, there is a path in package.json that leads to the app.js file
// Landing page
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../public/index.html'));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question