Skip to content

vitaliisili/FastApi-Kanban-App

Repository files navigation

FastApi Kanban App


How to run:

  • Clone project.
git clone <project url>

 

  • Go to project foolder.
cd <project folder>

 

  • Create virual environment. Command bellow will create environment with your default python version, for other version like 3.10 or 3.11 run command with your version.
python3 -m venv .venv

 

  • Activate virtual environment.
source .venv/bin/activate

 

  • Update pip version (OPTIONAL)
pip3 install --upgrade pip

 

  • Install all requirements from requirements.txt file.
pip install -r requirements.txt --upgrade

 

  • Create file .env in root folder
touch .env

 

  • Open .env file in your favorite redactor and add next environments:
DB_USERNAME=<database_username>
DB_PASSWORD=<secret_password>
DB_HOSTNAME=<database_host>
DB_PORT=<database_port>
DB_NAME=<database_name>
TOKEN_SECRET_KEY=<token_secret_key>
TOKEN_ALGORITHM=<token_algorithm>
TOKEN_EXPIRE_MINUTES=<expire_time_in_minute>

Example .env file:

DB_USERNAME=postgres
DB_PASSWORD=root
DB_HOSTNAME=localhost
DB_PORT=5432
DB_NAME=kanban_db
TOKEN_SECRET_KEY=dsjghj435ghfghjbmn687gdfhjkhgjkhdfg897456jkhgsdgkh567897dfgh
TOKEN_ALGORITHM=HS256
TOKEN_EXPIRE_MINUTES=60

 

If you have PostgreSQL installed in your local machine just add credentials in .env file

If not use docker to create a container with PostgreSQL image run docker-compose.yml file.

docker-compose up -d

Make sure container run successfully

docker ps

docker_postgres_container_run

  • Run uvicorn server
uvicorn api.main:app --reload --port=8888

FastApi Application runs on http://localhost:8888

Done

The server will restart automatically when files change

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages