https://github.com/yevheniidatsenko/goit-pythonweb-hw-03
📂 Hometask - FullStack Web Development with Python (Simple Web App)
https://github.com/yevheniidatsenko/goit-pythonweb-hw-03
docker docker-compose goit-pythonweb-hw-03 http-server python websocket
Last synced: 2 months ago
JSON representation
📂 Hometask - FullStack Web Development with Python (Simple Web App)
- Host: GitHub
- URL: https://github.com/yevheniidatsenko/goit-pythonweb-hw-03
- Owner: yevheniidatsenko
- Created: 2025-01-18T16:04:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-18T18:45:37.000Z (4 months ago)
- Last Synced: 2025-01-18T18:48:42.497Z (4 months ago)
- Topics: docker, docker-compose, goit-pythonweb-hw-03, http-server, python, websocket
- Language: HTML
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Web Application
## Overview
This project implements a simple web application with routing for two HTML pages: `index.html` and `message.html`. The application handles static resources, processes form submissions, and displays stored messages.
## Features
- **Routing**:
- Two HTML pages: `index.html` and `message.html`.
- Static resources: `style.css` and `logo.png`.
- Error handling for 404 Not Found with `error.html`.- **Form Handling**:
- The form on `message.html` captures `username` and `message`.
- Submitted data is converted to a dictionary and saved in `data.json` in the `storage` directory with a timestamp.- **Message Display**:
- A route `/read` displays all stored messages using a Jinja2 template.## File Structure
```
/project-directory
│
├── storage/
│ └── data.json
│
├── templates/
│ ├── index.html
│ ├── message.html
│ ├── error.html
│ └── read.html
│
├── static/
│ ├── style.css
│ └── logo.png
│
├── app.py
└── Dockerfile (optional)
```## Requirements
- Python 3.x
- Flask
- Jinja2## Installation
1. Clone the repository:
```bash
git clone
cd
```2. Install the required packages:
```bash
pip install Flask
```3. Run the application:
```bash
python app.py
```4. Access the application at `http://localhost:3000`.
## Results
- **Homepage**: 
- **Message Page**: 
- **Message Sent**: 
- **Message History**: 
- **Page 404**: 
- **Status**: 
- **Docker**: 