Application to show product price details and to calculate product price based on the UNIT price of a specific product.
Make sure following are available
- JDK 1.8
- Docker and Docker Compose
- Node 12.13.1
- Angular CLI 8.3.xxx
- PostgreSQL 12.4
- PostgreSQL instance should be exposed in localhost in port 5432
- Default database store should be created with the credentials available in the yml file
- Backend available at src/main/java
- Frontend available at src/main/webapp
- PostgreSQL instance can be generated by using docker-compose file at src/main/docker(command : docker-compose up)
- Backend will be available by using following command at the project root.
SPRING_PROFILES_ACTIVE=dev ./gradlew bootRun
- Frontend will be served at http://localhost:4200 by executing following command at src/main/webapp
ng serve
In the project root directory execute the following bach script
- Angular CLI above mentioned version should be available globally in order to build to work.
./build.sh
- PostgreSQL instance should available at locally, port 5432 with correct credentials in order to jar file to work.
java -jar -Dspring.profiles.active=dev build/libs/product-store-0.0.1-SNAPSHOT.jar
After executing above command application present at http://localhost:8080
- All the test cases written to test application core logics are available at src/test/java
- Docker based build solution has implemented using Dockerfile and docker compose file also available to create the necessary environments.
- Using the following command in the root directory to execute the build.
docker-compose up --build
- Whole application will be presented at http://localhost:8080/#/