Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
update the port to avoid conflicts between services
Browse files Browse the repository at this point in the history
  • Loading branch information
MEZ901 committed Mar 24, 2024
1 parent 8aee2a3 commit ae51667
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
target: development
restart: always
ports:
- '3000:3000'
- '3002:3002'
volumes:
- ./src:/app/src
- ./.env:/app/.env
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ RUN npm install -g pnpm && \

COPY --from=development /app/dist ./dist

EXPOSE 3000
EXPOSE 3002

CMD ["node", "./dist/main.js"]
7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { AppModule } from './app.module';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
app.enableCors({
origin: 'http://localhost:3000',
credentials: true,
});
app.setGlobalPrefix('api');
await app.listen(3002);
}
bootstrap();

0 comments on commit ae51667

Please sign in to comment.