File size: 459 Bytes
545f89a
 
 
9551db2
545f89a
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PrismaPg } from '@prisma/adapter-pg';
import { PrismaClient } from '~/generated/client';

@Injectable()
export class PrismaService extends PrismaClient {
  constructor(private readonly configuration: ConfigService) {
    const adapter = new PrismaPg({
      connectionString: configuration.get<string>('DATABASE_URL'),
    });
    super({ adapter });
  }
}