Split exchange into quotes service
All checks were successful
Build Docker Image / build (push) Successful in 2m0s
All checks were successful
Build Docker Image / build (push) Successful in 2m0s
This commit is contained in:
10
src/db.ts
10
src/db.ts
@@ -1,3 +1,11 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
import { PrismaPg } from '@prisma/adapter-pg'
|
||||
|
||||
export const prisma = new PrismaClient()
|
||||
const connectionString = process.env.EXCHANGE_DATABASE_URL
|
||||
if (!connectionString) {
|
||||
throw new Error('EXCHANGE_DATABASE_URL is required')
|
||||
}
|
||||
|
||||
const adapter = new PrismaPg({ connectionString })
|
||||
|
||||
export const prisma = new PrismaClient({ adapter })
|
||||
|
||||
Reference in New Issue
Block a user