Removed disconnect call.

This commit is contained in:
Mike Cao 2020-07-24 10:56:45 -07:00
parent a6975ecedd
commit 533ffbda13
2 changed files with 6 additions and 10 deletions

View File

@ -1,17 +1,13 @@
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient({
export const prisma = new PrismaClient({
log: [process.env.NODE_ENV !== 'production' && 'query'],
});
export async function runQuery(query) {
return query
.catch(e => {
return query.catch(e => {
console.error(e);
throw e;
})
.finally(async () => {
await prisma.disconnect();
});
}

View File

@ -1,6 +1,6 @@
{
"name": "umami",
"version": "0.1.0",
"version": "0.2.0",
"description": "Deliciously simple website stats",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",