Screenshots are captured in a Docker container with a headless browser. Task: MIL-004#1 Task: MIL-004#2 Task: MIL-004#3 Task: MIL-004#4 Task: MIL-004#5
18 lines
1.1 KiB
Markdown
18 lines
1.1 KiB
Markdown
**English** · [Dansk](Lecture-6-Final-Project-da) · [Bahasa Melayu](Lecture-6-Final-Project-ms)
|
|
|
|
# Lecture 6: Final project
|
|
|
|

|
|

|
|

|
|
|
|
Code: `server.py` and `src/higher_lower/`.
|
|
|
|
## What we gained
|
|
|
|
- Everything of the day in one program: routes, a variable URL section, HTML, styles and GIFs.
|
|
- The secret number is chosen once when the app starts; `/<int:guess>` compares the guess with it.
|
|
- Each answer has its own heading colour and GIF. The headings, colours and GIF addresses live in `constants.py`.
|
|
- The rule that compares two numbers is a plain function in the `domain` layer, so tests do not need Flask.
|
|
- Tests use the Flask test client with a fixed secret number and need no network.
|