This is a simple web application that can shorten long links into shorter ones. The application uses a unique algorithm to generate short, random identifiers for each link. In addition to shortening links, the application also provides an endpoint ("/reverse/") that allows users to retrieve the original link. The application is designed to be user-friendly and accessible to everyone who needs to shorten their links.
- Docker
- Django Rest Framework
- drf-spectacular
- pytest
- mypy
- black
- clone the repository
- go to the project folder
- fill
.env
file with your values (you can usebackend/envs/backend_env-default.env
as an example) - run
docker compose up --build
- run migrations
docker compose exec backend_api python manage.py migrate
- run
docker compose exec backend_api pytest
- run
docker compose exec backend_api black .
- run
docker compose exec backend_api mypy .
- run
docker compose exec backend_api pytest --cov=. --cov-report=html
- open
htmlcov/index.html
in your browser - check the coverage report
- run project as described in
How to run
section - open
http://localhost:8000/api/schema/swagger-ui/"
in your browser - check the API documentation
- open
http://localhost:8000/api/schema/redoc/
in your browser