- Press the green button that says "Use this template"
- Name your repo
- Press button that says "Create repository from template"
- Make sure to run the following command inside of your backend repo top level folder. If you don't have a backend repo, checkout this repository
git clone YOUR_REPO
cd /YOUR_REPO/frontend
npm install
npm start
- Before interacting with the frontend, make sure the backend is up an running!! That means the express or spring and points and the database that you decided to use.
- You're done! There are three buttons on the frontend that exercise corresponding endpoints on the backend. They are listed below:
cd /YOUR_REPO/frontend
npm install
npm start
- Before interacting with the frontend, make sure the backend is up an running!! That means the express or spring and points and the database that you decided to use.
- You're done! There are three buttons on the frontend that exercise corresponding endpoints on the backend. They are listed below:
- Write Data to Database: This button will write whatever you input in the textbox to the database.
- Read Data from Database: This button will read whatever you have written to the database thus far.
- Parse Token: This button will parse a JWT token located in your browser's headers and display the parsed data.
Make sure the backend endpoints and database are both up before running the tests!
To test with enzyme run npm run test
. Make sure to press 'a' when the dialog pops up on your terminal.
To test with cypress, run the following commands. Running in development mode is important for gather coverage data!
npm run start-dev
npx cypress open
Then, click on the file called app.spec.js
to run the tests contained within that file.
To check the code coverage of the tests, run the following command. Make sure to run the cypress tests before you run these commands!
npx nyc report --text