Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ii:labs:s2:04:tasks:02 [2022/05/18 17:01]
radu.ciobanu created
ii:labs:s2:04:tasks:02 [2024/04/11 13:08] (current)
radu.ciobanu [02. [20p] Building an image]
Line 1: Line 1:
-==== 02. [00pTesting a web application using Postman ​====+==== 02. [20pBuilding an image ====
  
 == Subtasks == == Subtasks ==
  
-The application ​started earlier is a web application that does not have graphical interface ​(i.e., ​a frontend). For this reason, it can only be tested by sending HTTP requests using client such as [[https://www.postman.com|Postman]]. We will not show how to use Postman ​to connect to a web application backend.+  - go to the //​**flask_app**//​ folder from the {{:​ii:​labs:​s2:​04:​lab4_docker.zip|lab archive}} 
 +  - modify the //​**images**//​ array in the //​**app.py**//​ file to make the application ​display other images of your choice 
 +  - modify the //​**templates/​index.html**//​ file to display ​different title related to your chosen images ​(i.e., ​change line 22) 
 +  - build a Docker image entitled //​**myflaskimage**//​ based on the provided //​**Dockerfile**//​ 
 +  - run container based on your image on port 8888 
 +  - check [[http://localhost:​8888]] to see if your container was started successfully
  
-In the Postman applicationwe can create ​the two types of applications we want to test: +<note important>​If you are solving this lab on Play with Dockeryou can access an exposed port by clicking on the port button as shown in red in the image below.</​note>​
-• GET  shows us the list of books in the library +
-• POST  adds a book to the library.+
  
-The steps to accomplish this are outlined below. First, once we have opened the Postman application,​ press the + button, as can be seen in the image below (the button is circled in red): +{{:ii:​labs:​s2:​03:​tasks:​pwd_port.png?​direct&​800|}}
- +
-  -  +
-  -  +
- +
- +
-== What to upload == +
- +
-  * a text file containing the executed commands+
ii/labs/s2/04/tasks/02.1652882498.txt.gz · Last modified: 2022/05/18 17:01 by radu.ciobanu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0