This project was bootstrapped with Create React App.
You can find the most recent version of the create-react-app guide here.
General Assembly has added a few nice-to-have to get your React project started, including:
- react-router
- Various scripts from our browser-template, like ability to deploy, lint, nag, and test. Check package.json for the scripts that are available, and run like:
npm run deploy
script to deploy to github pages
- bootstrap
- sass
TODO:
- add user authentication examples
- add example resource CRUD with axios
- Download this template.
- Move to the
wdi/projects
directory, then unzip the template directory withunzip /Users/<user-name>/Downloads/react-template-master.zip
.
- Rename the template directory from
react-template-master
to<project-name>-client
. - Empty
README.md
and fill with your own content. - Replace all instances of
react-template
with the name of your project. This should occur in package.jsonname
property.
- Install dependencies with
npm install
. - When ready, start the server with
npm start
- This opens up a server on the default port
- Set your default port to 7165 by making a
.env
file and settingPORT=7165
- Move into your new project and
git init
. - Add all of the files in your project with the command
git add --all
.- Note: This is the only time you should run this command!
- Commit all of your files with the command
git commit
.- Your commit title should read
Initial commit
.
- Your commit title should read
- Create a new repository on github.com, not GitHub Enterprise.
- Name the new repository with the same name used on Step 3.
- Follow the instructions on your new repository's setup page. For details on how to push to Github, refer to the section on Github entitled "…or push an existing repository from the command line." Further documentation can be found here.
- Replace the
homepage
property in package.json with your github pages site, "https://<github_username>.github.io/<your_project_name>/" - Deploy to github pages by running
npm run deploy
- This script runs
npm run build
and pushes your code to your repo's gh-pages branch. If the script fails, you can investigate the script and run each command individually to discover the cause of the failure.
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].