diff --git a/README.md b/README.md index fa8572d..c52d0d8 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,16 @@ Protean example implementation `pre-commit install` +## Running Development Servers + +1. Catalogue domain: + + FastAPI Server: `fastapi dev src/catalogue/main.py` + +1. Lending domain: + + Protean Server: `PROTEAN_ENV=dev protean server --domain lending.domain` + ## Running Tests - Basic: `make test` diff --git a/src/catalogue/main.py b/src/catalogue/main.py index e6a9fea..9b949eb 100644 --- a/src/catalogue/main.py +++ b/src/catalogue/main.py @@ -18,7 +18,7 @@ # Redis setup def get_redis_client(): - return redis.Redis(host="localhost", port=6379, db=0) + return redis.Redis(host="localhost", port=6379, db=2) def get_db(): diff --git a/src/lending/create_db.sh b/src/lending/create_db.sh new file mode 100755 index 0000000..d063c73 --- /dev/null +++ b/src/lending/create_db.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Variables for database connection +DB_HOST="localhost" +DB_PORT="5432" +DB_ADMIN="postgres" # The database admin user (e.g., 'postgres') +DB_ADMIN_PASSWORD="postgres" + +# Variables for the new user and database +DB_NAME="local_postgres" +DB_USER="local_postgres" +DB_USER_PASSWORD="local_postgres" + +# SQL commands to create the user +SQL_CREATE_USER=$(cat <