Update S13: Practice 4 authored by Rodrigo's avatar Rodrigo
...@@ -25,9 +25,8 @@ ...@@ -25,9 +25,8 @@
## Introduction ## Introduction
The goal of this practice is to develop a **web server** with information about the **four bases**: A, C, T and G. Each base should have **its page**, with the following information: **Name**, **letter**, **chemical formula** and a **link** to the wikipedia URL with **more information**. In addition, each page will be in a **different color**. This table describe the **names** of the resources (path) for getting the web pages The goal of this practice is to develop a **web server** with information about the **four bases**: A, C, T and G. Each base should have **its page**, with the following information: **Name**, **letter**, **chemical formula** and a **link** to the wikipedia URL with **more information**. In addition, each page will be in a **different color**. This table describe the **names** of the resources (path) for getting the web pages
| Resource | html File | Description | | Resource | html File | Description |
|--------------|-----------|-------------| |----------|-----------|-------------|
| **/info/A** | A.html | Information about the Adenine base. Color: lightgreen | | **/info/A** | A.html | Information about the Adenine base. Color: lightgreen |
| **/info/C** | C.html | Information about the Cytosine base. Color: yellow | | **/info/C** | C.html | Information about the Cytosine base. Color: yellow |
| **/info/G** | G.html | Information about the Guanine base. Color: ligthblue | | **/info/G** | G.html | Information about the Guanine base. Color: ligthblue |
...@@ -62,7 +61,7 @@ The page is quite similar to the Page of the **Green server**. Use the **H1 tags ...@@ -62,7 +61,7 @@ The page is quite similar to the Page of the **Green server**. Use the **H1 tags
### Exercise 2: info/A ### Exercise 2: info/A
* **Filename**: P4/EX2.py * **Filename**: P4/EX2.py
* **Description**: Write a webserver that returns the **A.html** file when the **info/A** resource is **requested** by the client. When the URL **http://127.0.0.1:8080/info/A** is written in the browser, we should see the **web page** of the **A base**. If another resource is requested, the server will send a response message with a **blank body** (therefore a blank page will be shown) * **Description**: Write a webserver that returns the **A.html** file when the **info/A** resource is **requested** by the client. When the URL [**http://127.0.0.1:8080/info/A**](http://127.0.0.1:8080/info/A) is written in the browser, we should see the **web page** of the **A base**. If another resource is requested, the server will send a response message with a **blank body** (therefore a blank page will be shown)
![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-03.png) ![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-03.png)
...@@ -87,11 +86,10 @@ The page is quite similar to the Page of the **Green server**. Use the **H1 tags ...@@ -87,11 +86,10 @@ The page is quite similar to the Page of the **Green server**. Use the **H1 tags
![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-06.png) ![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-06.png)
### Exercise 6: index.html ### Exercise 6: index.html
* **Filename:** P4/index.html and P4/EX6.py * **Filename:** P4/index.html and P4/EX6.py
* **Description**: Final version of the web server. When you connect to URL: **http://127.0.0.1:8080/** you get the main page: **index.html** with **links** to the other bases: * **Description**: Final version of the web server. When you connect to URL: [**http://127.0.0.1:8080/**](http://127.0.0.1:8080/) you get the main page: **index.html** with **links** to the other bases:
![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-07.png) ![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-07.png)
...@@ -99,7 +97,6 @@ In addition, **modify** all the other **html** files (A.html, C.html, G.html, T. ...@@ -99,7 +97,6 @@ In addition, **modify** all the other **html** files (A.html, C.html, G.html, T.
![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-08.gif) ![](https://github.com/myTeachingURJC/2019-2020-PNE/raw/master/s13-http-2/exercises-08.gif)
## END of the session ## END of the session
The session is finished. Make sure, during this week, that everything in this list is checked! The session is finished. Make sure, during this week, that everything in this list is checked!
...@@ -119,8 +116,8 @@ The session is finished. Make sure, during this week, that everything in this li ...@@ -119,8 +116,8 @@ The session is finished. Make sure, during this week, that everything in this li
* [ ] EX6.html * [ ] EX6.html
* [ ] All the previous files have been pushed to your remote Github repo * [ ] All the previous files have been pushed to your remote Github repo
# Credits # Credits
* [Juan González-Gómez](https://github.com/Obijuan) (Obijuan) * [Juan González-Gómez](https://github.com/Obijuan) (Obijuan)
* [Alvaro del Castillo](https://github.com/acs). He designed and created the original content of this subject. Thanks a lot :-) * [Alvaro del Castillo](https://github.com/acs). He designed and created the original content of this subject. Thanks a lot :-)
... ...
......