real back
This commit is contained in:
@@ -3,6 +3,9 @@ set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
LOG_DIR="$ROOT_DIR/.tmp/backend-logs"
|
||||
DATABASE_URL="${DATABASE_URL:-postgres://fable:fable_dev_password@127.0.0.1:5432/fable?sslmode=disable}"
|
||||
TOKEN_SECRET="${TOKEN_SECRET:-local-dev-secret-change-me}"
|
||||
TOKEN_TTL="${TOKEN_TTL:-24h}"
|
||||
mkdir -p "$LOG_DIR"
|
||||
|
||||
pids=()
|
||||
@@ -21,7 +24,7 @@ start_service() {
|
||||
local name="$1"
|
||||
local port="$2"
|
||||
echo "Starting $name service on :$port"
|
||||
(cd "$ROOT_DIR/services" && PORT="$port" go run "./cmd/$name") >"$LOG_DIR/$name.log" 2>&1 &
|
||||
(cd "$ROOT_DIR/services" && PORT="$port" DATABASE_URL="$DATABASE_URL" TOKEN_SECRET="$TOKEN_SECRET" TOKEN_TTL="$TOKEN_TTL" go run "./cmd/$name") >"$LOG_DIR/$name.log" 2>&1 &
|
||||
pids+=("$!")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user