E
E
Evgeny19982021-11-12 17:50:49
React
Evgeny1998, 2021-11-12 17:50:49

How to deploy a React app on your own server?

We have a computer from which we made a server on which there is a working site, before it was on jquery (frontend) Now we are rewriting it on React (we want). I created a create-react app. I entered the npm run build command and uploaded it to my own server. But the application does not start. Help, I'm a total noob at this. There is a lot of information on the Internet how to upload to hosting, but not to your own server.
1. What needs to be configured on the server?
2. Maybe some dependencies are needed?
3. Do you need a node modules folder on the server and a project in general, or is the build folder enough?
4. and if we used to have the main html called main_page.html, is it scary that I renamed index.html from the build folder?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Masson, 2021-11-15
@pumbasl

The whole site after the build is in the build folder, and you work with it and throw it on the server like any other site,
1. Usually not, but again, if you have Apache and nginx on the server, then no, but if you have a completely bare server , then the Internet is full of guides on how to set up a server for a site
2. No
3. No
4. why rename it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question