summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/db.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db.js b/src/db.js
index 087686a..d9c3f42 100644
--- a/src/db.js
+++ b/src/db.js
@@ -1,5 +1,7 @@
import fs from "node:fs/promises";
+// new URL is used to resolve the relative Filepath even if
+// CLI is being run in a different location on the system
const DB_PATH = new URL("../db.json", import.meta.url).pathname;
export const getDB = async () => {