From c413e5a0d883322881561cf014b28a7f2c3e6fa3 Mon Sep 17 00:00:00 2001 From: Shaurya Shaw Date: Tue, 28 Apr 2026 21:18:23 +0000 Subject: [PATCH 1/2] docs: fix port mismatch and standardize API to 8080 --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d51d2650..b590f426 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ Now run the server: pnpm run dev ``` -Voila! Your API server is running on `localhost:4000`. +Voila! Your API server is running on `localhost:8080`. Now you can access your app at `http://localhost:3000`. @@ -208,7 +208,7 @@ docker build -t opensox-api . 3. Run the container with your environment variables: ```bash -docker run -p 4000:4000 \ +docker run -p 8080:8080 \ --env-file apps/api/.env \ opensox-api ``` @@ -216,16 +216,16 @@ docker run -p 4000:4000 \ Or if you prefer to pass environment variables individually: ```bash -docker run -p 4000:4000 \ +docker run -p 8080:8080 \ -e DATABASE_URL="postgresql://USER:PASSWORD@host.docker.internal:5432/opensox?schema=public" \ -e JWT_SECRET="your-secret" \ - -e PORT=4000 \ + -e PORT=8080 \ opensox-api ``` **Note:** When using Docker, if your database is running on your host machine (not in a container), use `host.docker.internal` instead of `localhost` in your `DATABASE_URL`. -Your API server will be available at `http://localhost:4000`. +Your API server will be available at `http://localhost:8080`. ### Using Docker Compose (Optional) @@ -248,11 +248,11 @@ services: api: build: . ports: - - "4000:4000" + - "8080:8080" environment: DATABASE_URL: postgresql://opensox:opensox@postgres:5432/opensox?schema=public JWT_SECRET: your-secret-key - PORT: 4000 + PORT: 8080 NODE_ENV: production depends_on: - postgres From 0ddc4012f0779823a2b1b9217d8caf884db3278d Mon Sep 17 00:00:00 2001 From: Shaurya Shaw Date: Tue, 28 Apr 2026 21:52:04 +0000 Subject: [PATCH 2/2] fix: update API port to 8080 for consistency --- Dockerfile | 2 +- apps/api/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1b37fd8..5c42cfed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,6 +76,6 @@ RUN pnpm install --prod WORKDIR /app/apps/api -EXPOSE 4000 +EXPOSE 8080 CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index f1925322..17d113d9 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -18,7 +18,7 @@ import { SUBSCRIPTION_STATUS } from "./constants/subscription.js"; dotenv.config(); const app = express(); -const PORT = process.env.PORT || 4000; +const PORT = process.env.PORT || 8080; const CORS_ORIGINS = process.env.CORS_ORIGINS ? process.env.CORS_ORIGINS.split(",") : ["http://localhost:3000", "http://localhost:5000"];