From a63507c21ee1498ee48edb5028951a044cae69d2 Mon Sep 17 00:00:00 2001 From: Anuraag Jain Date: Thu, 11 Jan 2024 21:54:14 +0200 Subject: [PATCH] feat: custom port for server --- backend/dev.sh | 3 ++- backend/start.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/dev.sh b/backend/dev.sh index 9d0b5fa42..50dc5cad1 100644 --- a/backend/dev.sh +++ b/backend/dev.sh @@ -1 +1,2 @@ -uvicorn main:app --port 8080 --host 0.0.0.0 --forwarded-allow-ips '*' --reload \ No newline at end of file +SERVER_PORT="${SERVER_PORT:-8080}" +uvicorn main:app --port $SERVER_PORT --host 0.0.0.0 --forwarded-allow-ips '*' --reload \ No newline at end of file diff --git a/backend/start.sh b/backend/start.sh index ba68207ec..9ced76448 100755 --- a/backend/start.sh +++ b/backend/start.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash -uvicorn main:app --host 0.0.0.0 --port 8080 --forwarded-allow-ips '*' +SERVER_PORT="${SERVER_PORT:-8080}" +uvicorn main:app --host 0.0.0.0 --port $SERVER_PORT --forwarded-allow-ips '*'