git clone [email protected]:robghchen/tracking-system.git
cd tracking-system
git checkout master
git pull
yarn install
git checkout -b <branch name>
format is git checkout -b issueNUMBER-title-with-dashes-in-between
ie: git checkout -b 12-make-home-page
npx json-server --watch db.json --port 3001
yarn start
hit someone up to pair program, it makes learning more fun
when you're done with the feature and are ready to push it online to github, double check your work on the left panel in vscode, click the fork looking icon then click through the files you worked on to visually inspect the code changes you made. if you're satisfied with what you see then in your terminal type:
git add .
git commit -m <message>
format is git commit -m "action(topic): message"
ie: git commit -m "feat(home): create home page"
ie: git commit -m "fix(dashboard): rating not showing next to company name"
ie: git commit -m "style(navbar): change background color to light blue"
git push
or
git push origin head
or
git push origin <branch name>
in the terminal where you did git push, you'll see there is a link to github for the branch you just pushed to, click that link
on the github page click "new pull request", fill in the description then click "create pull request". i will be notified to review your code then i will either request changes or approve your pull request. once approved then you can merge your code into the master branch.
be sure to type closes #ISSUE_NUMBER
in the description field to link the pull request with the ticket/issue
Visit https://github.com/robghchen/tracking-system-api for instructions.
- Visit https://netlify.com and signup
- Click "New site from Git"
- Click "GitHub"
- Type the repo for your frontend and hit enter
- Click your repo
- Click "Deploy site"
- If your deploy ever fails, click "Production: master@something Failed" to go to the logs and read through it for the error then fix what needs to be fixed.
- In VSCode, do a global search for
http://localhost:3001/api/v1/
and replace every instance of that with your new api url. i.e:https://tracking-system-api.herokuapp.com/api/v1/
(notice localhost is http, and heroku is https) - Use a setInterval to fetch your data like we do here in
App.tsx
to wake heroku up, more details in this blog post https://medium.com/@robertchen234/save-deploying-your-apps-641532dfce7 - Save file then git add, git commit, and git push this change
- Click "Overview" tab
- Click "Site settings"
- Click "Change site name"
- Change it to whatever you want, this will be the public url where anyone can visit your site