This document provides instructions on how to run a Flask app. It also includes information on creating a virtual environment to isolate the project's dependencies.
Before running a Flask app, ensure that you have the following tools installed:
- Python 3
- Pip
- Clone the Flask app repository to your local machine using the following command:
git clone <repository-url>
- Navigate to the cloned repository.
- Create a virtual environment for the project using the following command:
python -m venv venv
- Activate the new virtual environment:
- For Linux/macOS:
source venv/bin/activate
- For Windows:
venv\Scripts\activate
- Install the required packages mentioned in the
requirements.txt
file using the following command:
pip install -r requirements.txt
- Run your Flask app locally using the following command:
python app.py
This will start the Flask server, and you can access your app at localhost:5000
or localhost:8000
in your web browser.
Finally to get it all running read this article to set your Spotify ID and secrets that are needed in the app.py - https://developer.spotify.com/documentation/web-api/concepts/apps.
Once you get them create a .env file and put the ID and secret there making sure to follow the naming conventions as the one described in the app.py for ID and secret.
- If you encounter any issues, make sure that all dependencies are installed and the virtual environment is activated correctly.