From ef8da2fbccdb3c1f9fd32f56d04723ab62ebcb83 Mon Sep 17 00:00:00 2001 From: HipsterBrown Date: Wed, 26 Aug 2020 20:50:47 -0400 Subject: [PATCH] update getDatabase to lookup DATABASE_TYPE env --- lib/queries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/queries.js b/lib/queries.js index 03b4759f..3bfc27fe 100644 --- a/lib/queries.js +++ b/lib/queries.js @@ -6,7 +6,7 @@ const POSTGRESQL = 'postgresql'; const MYSQL = 'mysql'; export function getDatabase() { - return process.env.DATABASE_URL.split(':')[0]; + return process.env.DATABASE_TYPE || process.env.DATABASE_URL.split(':')[0]; } export async function getWebsiteById(website_id) {