Installation instruction:
-
Please clone my repo https://github.com/pareshmeb/paresh-TC
-
Please navigate to cc folder using a terminal
-
run - composer install
-
run - docker-compose up
-
All endpoints returns Json Data. use belows url to test: GET - http://127.0.0.1:8080/topsales GET - http://127.0.0.1:8080/employeeReports/10 GET - http://127.0.0.1:8080/employeeSales/10
-
Please navigate to angular folder
-
do npm install
-
ng serve --open
-
If you need to change API ip address then please change in api.service.ts file
-
Explanation: I have created 1 service(sales). Sales service has it's own database so that they can be easily deployed on the separate server. It is using the postgreSQL database. It is using slim framework for rest API. You can find the database structure file in postgres/docker-entrypoint-initdb/init.sql.
All codes written by me you will find into below folders. \cc\SalesService
\cc\src\Common \cc\app\routes.php \angular \resultsPlease let me know if you have questions or need a help to setup.