Need2Watch is a web application where you can keep a track of the Tv Series and Movies that you are following and watching
The backend of this application consist in an API REST.
- Docker
- Docker-Compose
- MySQL
- Virtualenv
- Python 3.8
- Create a Python 3.8 Virtual environment
- Inside the environment run
pip install -r requirements
If you get any errors in this step, check that all the dependencies are installed on your system.
- Run
docker-compose up -d
If you get an error saying that the port for the container is already been used, you may stop the mysql service. In most Linux distributions you can do it with
sudo systemctl stop mysql.service
. - Create an .env file from env.dist file and set the environment variables. You should get
MOVIE_API_KEY
from TMDB - Run
python init_dbs.py
- Check everything is ok running the test with
pytest
. - Run
flask run
- Access to
http://127.0.0.1:5000
and you will see the Swagger UI with all the API methods and you can test them.
- Install Docker
- Install Docker-Compose
- Install all the dependencies running
sudo apt install python3.8 python3.8-dev virtualenv build-essential mysql-server mysql-client libmysqlclient-dev libsqlclient-dev libssl-dev -y
- Create the virtual environment with
virtualenv -p python3.8 venv
- Activate it running
source venv/bin/activate
- Follow the steps specified above