feat: remove appwrite and add nextjs backend
This commit is contained in:
18
backend/src/prisma/prisma.service.ts
Normal file
18
backend/src/prisma/prisma.service.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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("DB_URL"),
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(config.get("DB_URL"));
|
||||
super.$connect().then(() => console.info("Connected to the database"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user