feat: initialize NestJS application with global exception handling and request context
- Added nest-cli.json for Nest CLI configuration. - Created package.json with dependencies and scripts for building, testing, and linting. - Implemented AppController and AppService with a basic "Hello World!" response. - Established AppModule with middleware for request ID and global interceptors for response standardization. - Introduced ContextService for managing request-scoped context using AsyncLocalStorage. - Developed custom decorators for response messages and standardized error handling with DTOs. - Implemented global exception filter to handle various HTTP exceptions and Prisma errors. - Added middleware for generating unique request IDs. - Configured TypeScript settings for the project. - Created comprehensive unit and e2e tests for the application.
This commit is contained in:
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17
|
||||
container_name: the_happy_pupbox_postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: the_happy_pupbox
|
||||
POSTGRES_PASSWORD: the_happy_pupbox
|
||||
POSTGRES_DB: the_happy_pupbox
|
||||
ports:
|
||||
- "6090:5432"
|
||||
volumes:
|
||||
- the_happy_pupbox_postgres:/var/lib/postgresql/data
|
||||
networks:
|
||||
- the_happy_pupbox_network
|
||||
|
||||
networks:
|
||||
the_happy_pupbox_network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
the_happy_pupbox_postgres:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user