This simple project is what I built when learning ReactJS. Data is fetched from The New York Times' APIs. The app is using Flux architecture, styled by Bootstrap, including tests by Jest & Enzyme, also has Travis continuous integration & Heroku auto-deployment.
-
Install
NodeJS&NPM(Recommend Node v8.11.1 & npm v5.6.0) -
Clone the repo with SSH
git clone git@github.com:BraveVN/nytimes_react.gitor HTTPS
git clone https://github.com/BraveVN/nytimes_react.git -
Go to app folder
cd nytimes_react -
Install dependencies
npm install -
Start the server:
npm run serveor
gulp serve -
Run the test cases:
npm run testIf Jest snapshot tests are fail, update it:
npm run test:updateRenderer
develop- This branch is used for development purposemaster- Master branch - the most stable codedeploy-heroku- Build & deploy on Heroku server
- Check out
develop - Fetch the code & rebase with
master - Do your job
- Commit & push code
- Create a pull request to
master - If
Travisturns green & your code is well reviewed then it'll be merged tomaster - Wait for
Travisto run onmaster - If it looks good then merge from
mastertodeploy-heroku - Build & test the code locally
- Commit & push code to Github. If
Travispass all test cases then the code will be autodeployed on Heroku server at: https://nytimes-react-2018.herokuapp.com/