Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

fix: load environment variables in the worker script

QAComet3fc61ac5cedd
diff --git a/package.json b/package.json
index 7b6aaa2e..5f2977d8 100644
--- a/package.json
+++ b/package.json
@@ -39,6 +39,7 @@
"crypto-js": "^4.2.0",
"csstype": "^3.1.2",
"dompurify": "^3.0.6",
+ "dotenv": "^16.3.1",
"eslint": "8.46.0",
"eslint-config-next": "13.4.9",
"formidable": "^3.5.1",
diff --git a/scripts/worker.ts b/scripts/worker.ts
index e84b9723..de025eaa 100644
--- a/scripts/worker.ts
+++ b/scripts/worker.ts
@@ -1,3 +1,4 @@
+import 'dotenv/config';
import { Collection, Link, User } from "@prisma/client";
import { prisma } from "../lib/api/db";
import archiveHandler from "../lib/api/archiveHandler";
diff --git a/yarn.lock b/yarn.lock
index a097607e..3ca11e1f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2714,6 +2714,11 @@ dompurify@^3.0.6:
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.6.tgz#925ebd576d54a9531b5d76f0a5bef32548351dae"
integrity sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==
+dotenv@^16.3.1:
+ version "16.3.1"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
+ integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
+
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"