-
First do a gradle build on the given project. Result would be generation of area-calculator.jar in the build directory
-
In the docker toolbox run the following commands $ docker build -t calculator . $ nohup docker run -p 5000:8080 calculator #$ docker-machine ip default This builds the docker container with the project jar uploaded on the container and exposes port 5000 of the container for the world
-
To test the endpoint use Postman or any equivalent rest client. GET http://:8080/area/square?Side=8 GET http://:8080/area/circle/4 POST http://:8080/area/rectangle/ Message body { "Length" : 2, "Breadth": 4.9 } Sample response { "shape": "RECTANGLE", "inputSides":{ "Breadth": 4.9, "Length": 2 }, "area": 9.8 }
-
Check the nohup logs for any errors.
-
Destroy the container after testing
-
Notifications
You must be signed in to change notification settings - Fork 0
kumaraakash25/AreaCalculator
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published