Skip to content

Commit

Permalink
Update TypeScript configuration and modify Docker Compose for databas…
Browse files Browse the repository at this point in the history
…e service
  • Loading branch information
vasapolrittideah committed Jan 21, 2025
1 parent 50d6aec commit 1c979b3
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.2",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.7.3",
Expand Down
7 changes: 4 additions & 3 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import {
ExpressAdapter,
NestExpressApplication,
} from '@nestjs/platform-express';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';

import { AppModule } from './app.module';

declare const module: any;

Expand All @@ -22,7 +23,7 @@ async function bootstrap() {
const documentFactory = () => SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api-docs', app, documentFactory);

await app.listen(process.env.PORT ?? 8000);
await app.listen(process.env.PORT ?? 9000);

if (module.hot) {
module.hot.accept();
Expand Down
7 changes: 3 additions & 4 deletions apps/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"extends": "@repo/tsconfig/tsconfig.nestjs.json",
"compilerOptions": {
"baseUrl": "src",
"outDir": "dist",
"baseUrl": "./",
"outDir": "./dist",
"paths": {
"@/*": ["*"]
"@/*": ["src/*"]
}
},
"include": ["src"],
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}
Binary file modified bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
services:
postgres:
db:
container_name: postgres
image: postgres:17-alpine3.21
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=/data/postgres
- POSTGRES_DB=peeko
ports:
- 5432:5432
volumes:
- db:/data/postgres
healthcheck:
Expand Down
3 changes: 1 addition & 2 deletions packages/tsconfig/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"preserveWatchOutput": true,
"useDefineForClassFields": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true
"strict": true
},
"exclude": ["node_modules"]
}
7 changes: 4 additions & 3 deletions packages/tsconfig/tsconfig.nestjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": false,
"incremental": true,
"target": "ES2022",
"module": "commonjs",
"moduleResolution": "Node10",
"moduleResolution": "node10",
"noFallthroughCasesInSwitch": false,
"noImplicitAny": false,
"removeComments": true,
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": false,
"strictBindCallApply": false
"strictBindCallApply": false,
"incremental": false,
"noEmit": false
}
}

0 comments on commit 1c979b3

Please sign in to comment.