mirror of
https://github.com/t3xhno/nestjs-auth.git
synced 2025-09-06 20:03:43 +00:00
initial commit
This commit is contained in:
16
src/prisma/prisma.service.ts
Normal file
16
src/prisma/prisma.service.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
@Injectable()
|
||||
export class PrismaService extends PrismaClient {
|
||||
constructor(config: ConfigService) {
|
||||
super({
|
||||
datasources: {
|
||||
db: {
|
||||
url: config.get('DATABASE_URL'),
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user