diff --git a/package-lock.json b/package-lock.json index 02c7c79..0193fd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sknsybot", - "version": "0.4.0.b3", + "version": "0.4.0.b4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sknsybot", - "version": "0.4.0.b3", + "version": "0.4.0.b4", "license": "Apache-2.0", "dependencies": { "chalk": "^5.4.1", diff --git a/package.json b/package.json index e910f52..b093db1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sknsybot", - "version": "0.4.0.b3", + "version": "0.4.0.b4", "private": true, "description": "", "license": "Apache-2.0", diff --git a/src/db/database.ts b/src/db/database.ts index 9d91033..1b07f5e 100644 --- a/src/db/database.ts +++ b/src/db/database.ts @@ -4,7 +4,10 @@ import * as schema from "./schema"; import { Pool } from "pg"; function urlToObj(url: string) { - if (!url) throw new Error('DATABASE_URL is not set'); + if (!url) { + console.warn("DATABASE_URL is not set, expect the database to not connect"); + return null; + } const { username, password, hostname, port, pathname } = URL.parse(url);