Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Removed disconnect call.

Mike Cao533ffbda1392
diff --git a/lib/db.js b/lib/db.js
index 8649b7881..6c107edbb 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -1,18 +1,14 @@
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 => {
- console.error(e);
- throw e;
- })
- .finally(async () => {
- await prisma.disconnect();
- });
+ return query.catch(e => {
+ console.error(e);
+ throw e;
+ });
}
export async function getWebsite(website_uuid) {
diff --git a/package.json b/package.json
index bd27cbddf..ad3280a32 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "umami",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "Deliciously simple website stats",
"author": "Mike Cao <[email protected]>",
"license": "MIT",