Last active
September 2, 2020 11:17
-
-
Save beeman/5832d625122048af78dbd475110c7c4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable() | |
export class DataService extends PrismaClient implements OnModuleInit, OnModuleDestroy { | |
constructor() { | |
super() | |
} | |
async onModuleInit() { | |
await this.$connect() | |
} | |
async onModuleDestroy() { | |
await this.$disconnect() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
postgres: | |
image: postgres | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_DB: prisma | |
POSTGRES_USER: prisma | |
POSTGRES_PASSWORD: prisma | |
volumes: | |
- ./tmp/postgres:/var/lib/postgresql/data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment