diff --git a/README.md b/README.md index 7fa83d1a3f..df03c53d32 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,7 @@ docker compose -f compose.yml -f compose.dev.yml up -d | User Service | 8082 | | Match Service | 8083 | | Collaboration & Room Service | 8084 | -| Chat Service | 8085 | -| History Service | 8086 | +| History Service | 8085 | **Step 4: Stop the Docker containers** diff --git a/compose.dev.yml b/compose.dev.yml index df22dde0b2..ceb93c8369 100644 --- a/compose.dev.yml +++ b/compose.dev.yml @@ -55,7 +55,7 @@ services: history: command: npm run dev ports: - - 8086:8086 + - 8085:8085 volumes: - /app/node_modules - ./services/history:/app diff --git a/nginx/default.conf b/nginx/default.conf index c11f501c63..e3b4aa9f21 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -15,7 +15,7 @@ upstream collaboration-api { } upstream history-api { - server history:8086; + server history:8085; } server { diff --git a/services/history/.env.sample b/services/history/.env.sample index 73dcca6808..481996d2a2 100644 --- a/services/history/.env.sample +++ b/services/history/.env.sample @@ -4,6 +4,6 @@ DB_CLOUD_URI= DB_LOCAL_URI=mongodb://history-db:27017/history BROKER_URL=amqp://broker:5672 CORS_ORIGIN=* -PORT=8086 +PORT=8085 JWT_SECRET=you-can-replace-this-with-your-own-secret NODE_ENV=development \ No newline at end of file diff --git a/services/history/Dockerfile b/services/history/Dockerfile index 2462b0176c..2124c32ab6 100644 --- a/services/history/Dockerfile +++ b/services/history/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /app COPY package.json package-lock.json ./ RUN npm install COPY . . -EXPOSE 8086 +EXPOSE 8085 CMD ["npm", "start"] \ No newline at end of file diff --git a/services/history/README.md b/services/history/README.md index 5b1a504d4a..6f4215b65a 100644 --- a/services/history/README.md +++ b/services/history/README.md @@ -27,7 +27,7 @@ docker compose down -v - This endpoint retrieves the history of a user. - **HTTP Method**: `GET` -- **Endpoint**: http://localhost:8086/api/history/history +- **Endpoint**: http://localhost:8085/api/history/history - **Headers** - `Authorization: Bearer ` (Required) - The endpoint requires the user to include a JWT (JSON Web Token) in the HTTP Request Header for authentication and authorization. This token is generated during the authentication process (i.e., login) and contains information about the user's identity. The server verifies this token to ensure that the client is authorized to access the data. diff --git a/services/history/src/config.ts b/services/history/src/config.ts index a122fdb191..c9c2973730 100644 --- a/services/history/src/config.ts +++ b/services/history/src/config.ts @@ -8,7 +8,7 @@ const envSchema = z NODE_ENV: z.enum(['development', 'production']).default('development'), CORS_ORIGIN: z.union([z.string().url(), z.literal('*')]).default('*'), JWT_SECRET: z.string().trim().min(32), - PORT: z.coerce.number().min(1024).default(8086), + PORT: z.coerce.number().min(1024).default(8085), }) .superRefine((data, ctx) => { const isUrl = z.string().url();