Reservations API
June 9, 2022 ยท View on GitHub
Simple API built with SpringBoot and MongoDB database.
Documentation
Documentation can be found here
How to run
Application
- Clone the repository by executing commands:
cd <yourRepoDirectory>
git clone https://github.com/cyrilgavala/reservations-api.git .
- Open the project with your preferable IDE. If you use IntelliJ IDEA, it will offer you a SpringBoot runner configuration.
- Update the runner by adding environment variable
DATABASE_URLcontaining URL to your MongoDB database andJWT_SECRETwith 512-bit secret. - Run the runner configuration.
Tests
-
To run tests you need to pass step 2. from previous instructions and run command:
./gradlew testIt will also execute
jacocoTestReportgradle task, which will generate test report on pathreservation-api/build/reports/jacoco/test/html/index.html. -
To run whether you pass 95% test coverage check, simply run command:
./gradlew jacocoTestCoverageVerification