What we do build in create-react-app?

Good evening, this is not a very smart question:
I recently write on react'e projects. The entire Assembly is reduced to create the installation-react-app. It puts all the dependencies and configures the server for us, at the end we have the server ready that can be run on port 3000. It's all clear

The question is. The official documentation says, after we have done the work necessary to prepare our project to "Production" this is done with the command npm build script(something like this)
So. And what exactly is in the build folder ?
as a back-end programmer will be to fill in my project in server part? Interested in, for example, Express.
I tried to put it on, to raise, to do with JSON data. But I do not understand, as I have a project on react I will fill in express js. As the build folder I'll make it easier?
PS I'm not talking about fine technical points. I would explain in General how and what is happening on the server Express, in the whole Association.
PS why the build folder needs to get to the server?
I WOULD BE VERY GRATEFUL FOR ANSWERS!
April 19th 20 at 12:47
1 answer
April 19th 20 at 12:49
Solution
why build folder needs to get to the server?

because there are stupid index.html+css+js which will open the browser, in contrast to the folder with the source files where a billion components and other stuff

I have a project on react I will fill in express js

not
  • on the server running node, which will launch express
  • Express will be giving away in the user browsers index.html from the collected (build) the application of reakt, which will be in its separate folder
  • users will access the application, it will speak to the Express
Thank you. The build directory must somehow be configured on the server, because there are dependencies, etc ? - jamie_Breitenbe commented on April 19th 20 at 12:52
@edna.Tremblay, nah, in build will already be completely assembled project, all dependencies will be pulled in js files, which will lie there

npm run build

This command is in the file app/app.the jsx will create in the project's public folder, and in it a new file bundle.js. This is the file that will connect to a web page.

That is, it will generate a regular file with the javascript code, which podderzhivaetsya all browsers. And we don't need any compiler Babel or any other files. We can just throw a web page in a web browser, and the app will also work.


create-react-app this and cool that it already has a ready-configured scripts that will do it with one command - Esteban_Borer commented on April 19th 20 at 12:55

Find more questions by tags Express.jsAssembling projectsnpmNode.jsReact