A simple service for creating and storing postcards
Accepts a recipient (name, etc.) and a message as input. Request format as shown in the example.
Flask + PostgreSQL in Docker
- Launch the project:
git clone https://github.com/ваш-логин/first.git cd first docker-compose up -d - Open in your browser: http://localhost:5001
Backend: Python Flask Database: PostgreSQL Infrastructure: Docker
| Method | URL | Actiom | Example Request |
|---|---|---|---|
GET |
/postcards |
Get all postcards | curl -s http://localhost:5001/postcards | jq |
POST |
/postcards |
Create a postcard | curl -X POST -H "Content-Type: application/json" -d '{"recipient":"Friend", "message":"Hi!"}' http://localhost:5001/postcards |