Videorreportagem "Uru-Eu-Wau-Wau: Terra em Disputa" publicada em hotsite feito em React e produzida pelo InfoAmazonia no especial Terra de Resistentes
- node v10.1.x
- npm v5.6.x
Install dependencies:
$ npm install
Create dist folder and compile project
$ npm run predeploy
Access http://localhost:3002/
Watch files
$ npm run watch
$ npm run deploy
OBS: open src/CNAME and change domain if needed
Install environment and dependencies
$ docker-compose build --no-cache
Starting docker
$ docker-compose up
Create public folder and compile project (in docker bash)
docker$ npm run predeploy
Access http://localhost:3002/
docker$ npm run deploy
-
If you use 2FA (2 factor authentication) on git hub, follow these steps.
-
When using docker you can use watch for save and auto compile files when developing. For this you have to copy dist and node_modules from docker to host and uncomment volumes in docker-compose.yml file. The steps are:
-
Copy dist and node_modules from docker to host (when docker-compose is up and running using bash from host) $ docker cp
$(docker-compose ps -q app):/usr/src/app/node_modules . $ docker cp$(docker-compose ps -q app):/usr/src/app/yarn.lock . $ docker cp $(docker-compose ps -q app):/usr/src/app/public . -
Uncomment dist and node_modules folder from .dockerignore file
-
Uncomment Volumes from docker-compose.yml
-
docker-compose down
-
docker-compose up
-
Inside docker bash: docker-compose exec app bash
docker$ npm run watch
rafgraph for the 404.html redirect (rewrite rule for github pages). It works!
Natalie Cardot how to easily Deploy a Create React App Project to GitHub Pages.
Ginny Fahs how to authenticate on github with 2FA.
Paulo Campos at Studio Cubo Web for converting this site into github pages host