I
I
Islam Ruziev2018-10-31 14:09:26
Software Deployment
Islam Ruziev, 2018-10-31 14:09:26

How to deploy a project to react?

Good afternoon! I want to ask you for information on how to deploy a project on react to hosting. The project is written using Express, React, React-router, Redux built with webpack without cra. The answer might be obvious: "Upload express to the server and upload the front to the server" but the problem is that when you run the npm run-script build script that executes the webpack --mode production command, the built application does not work. What do you mean it doesn't work? This means that when you run the index.html file, it is empty, and index_bundle.js is included, but this does not lead to anything. The question is, is it possible to run an application on a server (VDS) without building, for example, install node and npm on a server and run it as on a local computer? And how to create applications that will not lead to such problems at the production stage? Thank you!
PS If you need the code or structure of the application, I can throw it off

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RidgeA, 2018-10-31
@SIXTYONE61

> The question is, is it possible to run an application on a server (VDS) without building, for example, install node and npm on a server and run it as on a local computer?
It is possible, but not necessary.
You need to configure the server so that it would return not only index.html, but also the necessary resources - *.js, *.css, etc.
The list of what the server should return can be found in index.html and in the browser console

M
Maxim Timofeev, 2015-09-14
@Lici

The facebook widgets are for pages only. Not allowed for groups. So this is the error. Since there is no page with this url.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question