Here you can find prepared endpoint in Flask, which display plot of the quadratic function.
The endpoint gets in URL parameters of the quadratic function and limits of the plot.
Firstly, you have to clone this repository. To do this you have to open Git Bash. Write:
git clone https://github.com/karotka99/Cloud-Programming.git
Please put the cloned file to the Desktop. Nextly, you have to open Anaconda Powershell Prompt and there you have to get to the file by writing:
cd Desktop\Cloud-Programming
Now, don't close Anaconda Powershell Prompt and open Docker Desktop. Coming back to the Anaconda Powershell Prompt write the following commands to build an image:
docker build -t function_app:v1.0 .
Wait until it will be ready and write the following comment to run the container:
docker run --rm -it -p 5000:5000 function_app:v1.0
Now you have to display site in such way: http://localhost:5000/?a=1&b=-4&c=4&xmin=-5&xmax=10&ymin=0&ymax=10
Parameters
Parameters
You can enter your own values to see function with chosen parameters, domain and the set of values.
However you have to remember that following conditions have to be met:
Site will work, but with predetermined numbers
If you run http://localhost:5000/ you will see plot of predefined function:
But please, don't go crazy with parameters. Application is not prepared for problems like: what if
At the end you can remove the image by wirting following command:
docker image rm function_app:v1.0