This project is set up with React working in Vite with HMR and some ESLint rules.
- Clone the repository
- Run
npm install
in the project root directory to install the dependencies - Run
npm run dev
to start the project - Open your browser and go to
http://localhost:5173/
- You will see the prject is up and running.
- Run
npm run test
- Run
npm run test:coverage
- Run
npm run lint
- Run
docker compose up
in a new terminal in the project root - Run
node ./sonarqube/sonarscan.cjs
in another new terminal in the project root - Open your browser and go to
http://localhost:9000/
- Set up the SonarQube server
- Follow the instructions to analyze the project
- You will see the project is analyzed
- Run
npx cypress open
- For running end to end tests click on
E2E Testing
option in the newly opened window in the browser - Select browser from the list of browsers and click on
Start E2E Testing
button - You will see the
spec.cy.js
file in theSpecs
section - Click on the
spec.cy.js
file - You will see the Cypress tests are running
- Run
npm run build
- Run
npm run dev
- Run
npm run dev -- --port 3000
This project uses Husky to run the linting and testing scripts before committing the code. If the linting or testing scripts fail, the commit will be aborted. It automatically lint commit messages, code, and run tests upon committing or pushing.