D
D
DanilChekh2018-05-24 18:53:57
JavaScript
DanilChekh, 2018-05-24 18:53:57

How to properly upload a React app to a website?

Tell me, I don’t fully understand, let’s say there is such an application https://github.com/DenisPronin/react-challenge-sor...
How to make it so that it can be viewed on the network?
As I understand it, when starting gulp, the project is assembled into one js bundle file and the browser is launched, and if I open the index.js file in the public folder, the project will be empty. just unload the public folder? And what about the modules on which it depends, and so on?
UPD I understand the project is going but the data.json file that I have on the disk the project cannot get, writes like this
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
as I understand the file that I want to open needs to be uploaded to the hosting for access right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marataziat, 2018-05-27
@marataziat

Деплой (gulp deploy): пушит всё, что находится в папке public в ветку gh-pages. В результате сайт можно показать другу

in theory, if you used create-react-app, everything would be easier, just type one command and upload it to the CDN

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question