Przeglądaj źródła

feat: custom port for server

Anuraag Jain 1 rok temu
rodzic
commit
a63507c21e
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 1
      backend/dev.sh
  2. 2 1
      backend/start.sh

+ 2 - 1
backend/dev.sh

@@ -1 +1,2 @@
-uvicorn main:app --port 8080 --host 0.0.0.0 --forwarded-allow-ips '*' --reload
+SERVER_PORT="${SERVER_PORT:-8080}"
+uvicorn main:app --port $SERVER_PORT --host 0.0.0.0 --forwarded-allow-ips '*' --reload

+ 2 - 1
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 '*'