This project is a web-based word counting application that processes URLs to count the words on the corresponding web page. The application stack consists of a Flask backend, a MongoDB database, a Redis cache, and RQ for task queueing.
All the installed images, libraries, etc have a specific version to avoid any compatibility issues.
To use the FINNY AI DAT project, follow these steps:
git clone https://github.com/Assxios/FINNY_DAH.git
cd FINNY_DAH
To run the application, use the following command:
docker compose --profile default up
The application will be available at http://localhost:3000
. You can also access two dashboards:
- Mongo Express:
http://localhost:8081
- RQ Dashboard:
http://localhost:3000/rq
The following endpoints are available (on http://localhost:3000
):
- GET
/
: The home page of the application. - POST
/api/job
: Submit a URL to be processed. - GET
/api/job/<job_id>
: View the results of the word count for a job.
If you want to run the tests, use the following command:
docker compose --profile test up
To clean up the application, use the following command:
docker compose --profile default down -v
docker system prune -af
You should replace
default
withtest
if you are cleaning up the test environment.
- Flask: A micro web framework for Python.
- pymongo: A Python driver for MongoDB.
- flask-cors: A Flask extension for handling Cross-Origin Resource Sharing (CORS).
- rq: A simple Python library for queueing jobs and processing them in the background with workers.
- redis: A Python client for Redis.
- requests: A Python library for making HTTP requests.
- rq-dashboard: A web-based dashboard for monitoring RQ queues.
- pytest: A testing framework for Python.
- pytest-flask: A Pytest plugin for testing Flask applications.
Assxios (droge) |