Simple Calculator

Harry de Boer 7cce3c75ad backend: enable running integration tests with maven 5 vuotta sitten
backend 7cce3c75ad backend: enable running integration tests with maven 5 vuotta sitten
frontend 76d211e961 support a list of calculations in the frontend 5 vuotta sitten
.gitignore a9e178a9ca Set up backend project and initial SimpleCalculator class 5 vuotta sitten
README.md 3f94547450 update readme 5 vuotta sitten

README.md

Simple calculator

This calculator project contains a simple Angular based frontend, and a Spring based backend.

Environment

To compile and run this project the following software needs to be installed and available on the path. Versions used for development are listed.

  • Maven (3.6.3)
  • Java JDK (OpenJDK 11.0.9.1)
  • NPM (7.1.0)
  • Node.js (v12.19.0)
  • Angular (11.0.3)

Backend

To (somewhat) stay in line with RESTful principles, the backend api models a number as a resource on which calculations can be applied. This makes it possible to avoid hardcoding arithmetic operations in the frontend and use HATEOAS links instead. The latter is not implemented.

Compiling and running

Navigate into the backend directory and run mvn spring-boot:run. Integration and unittests can be run using mvn verify.

Example api call

Navigate to http://localhost:8080/numbers/5/add/15 in a browser and observe the response.

Frontend

Compiling and running

Make sure the backend is started first. Navigate to the frontend directory and run npm install followed by ng serve To access the UI navigate to http://localhost:4200/ with a browser. Unittests can be run using ng test. Integration test can be run using ng e2e

Author

Harry de Boer

email: hdboer@quintor.nl