-
Clone the Repository:
git clone https://github.com/your-username/repo-name.git cd repo-name
-
Install Dependencies:
pip install -r requirements.txt
-
Set Environment Variables: Create a
.env
file in the root directory and configure your environment variables, including database connection details and API tokens. -
Run FastAPI:
uvicorn main:app --reload
The API will be accessible at
http://localhost:8000
.
-
Install PostgreSQL: Follow the instructions on the official PostgreSQL website to install PostgreSQL on your system.
-
Create Database:
createdb social_media_db
-
Run Database Migrations:
alembic upgrade head
This will apply the necessary database migrations.
-
Configure Database URL: Update the
.env
file with your PostgreSQL database URL:DATABASE_URL=postgresql://username:password@localhost/social_media_db