The fastest way to hit the ground running with React for your next Mintbean challenge!
Comes with gh-pages
to deploy your React app without the fuss.
yarn global add create-react-app
or
npm install -g create-react-app
Replace <my-app>
with your new app name
create-react-app <my-app> --template cra-template-mintbean-challenge-react-starter
cd
into your new project and push it to a new Github repo using hub create
(don't have hub
? install it )
git add .
git commit -m "init"
hub create
git push origin master
A new repo has been created in your Github with the name of your project.
Run yarn start
to start your dev server. Get coding!
Deploy your app at any time after setting up the following config.
IMPORTANT In package.json
, between the "name" and "version" keys, add a new key "homepage". Replace values with your <github-username>
and <repo-name>
{
...
"homepage": "https://<github-username>.github.io/<repo-name>/",
...
}
Push any updates you have to master, then run:
yarn deploy
or if you use npm:
npm run deploy
That's it! You're app is now publically demo-able at https://<github-username>.github.io/<repo-name>/
By default, Github pages builds off master
branch, so push any changes you want deployed there. You can run yarn deploy
as often as you like. Be sure to deploy one last time at the end of the proejct period!
If you can't find your Github Page, go to your repo > "Settings" > scroll to Github Pages section.
This project was bootstrapped with Create React App.