mirror of
				https://github.com/t3xhno/nestjs-auth.git
				synced 2025-10-30 17:45:56 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			368 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			368 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 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'),
 | |
|         },
 | |
|       },
 | |
|     });
 | |
|   }
 | |
| }
 |