Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

nestjs prisma

import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
2	import { PrismaClient } from '@prisma/client';
3	
4	@Injectable()
5	export class PrismaService extends PrismaClient
6	  implements OnModuleInit, OnModuleDestroy {
7	  async onModuleInit() {
8	    await this.$connect();
9	  }
10	
11	  async onModuleDestroy() {
12	    await this.$disconnect();
13	  }
14	}
Comment

PREVIOUS NEXT
Code Example
Javascript :: make query param optional node 
Javascript :: JavaScript timer set Interval js ClearInterval 
Javascript :: javascript string literal 
Javascript :: type time angular 
Javascript :: npx vs npm 
Javascript :: object javascript 
Javascript :: double exclamation mark js 
Javascript :: wow.js 
Javascript :: when to use previous state in useState 
Javascript :: javascript url replace 
Javascript :: nesting arrays javascript 
Javascript :: pass a function as a parameter in other function 
Javascript :: map values js 
Javascript :: js arrow function 
Javascript :: javascript closures 
Javascript :: vue js skeleton loading 
Javascript :: how to add external link in angular 
Javascript :: json to csv 
Javascript :: arrow function javascript rules 
Javascript :: calendar picker react js 
Javascript :: node.js global variables 
Javascript :: javascript difference between window and Window 
Javascript :: backbone js 
Javascript :: how to set option value in fstdropdown using ajax 
Javascript :: connect redux 
Javascript :: array max value 
Javascript :: promise in js 
Javascript :: javascript infinity 
Javascript :: what is promise in javascript 
Javascript :: array filter with multiple conditions 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =