This is a boilerplate for a React App using JWTs for Authorization, and using react-router-dom
for client-side routing. Connect this app to the OAuth Boilerplate Server.
Route | Component | Purpose |
---|---|---|
/ |
Home | Home Page! |
/login |
Login | Login Page! |
/profile |
Profile | Show the contents of the user's data from JWT |
/saveToken |
saveToken | Handles redirect from server and saves JWT from queryString to localStorage |
* |
NoMatch` | 404 Page to handle all other incorrect routes |
git clone <repo_link> <new_name>
npm install
REACT_APP_SERVER_URL=http://localhost:8000 --- OR the url to your hosted server
npm start
Currently if we run this command:
git remote -v
It will show origin as being hooked up to the boilerplate repository. We want a fresh repository instead, so let's delete the origin remote:
git remote remove origin
Via the Github website. Follow directions as they show up when you create a new repository:
git init
git add .
git commit -m "Initial commit"
git remote add origin <new_repo_link>
git push origin main