From a089651693cf6912864a6589de0f7aad911a8b83 Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 29 May 2025 22:28:19 +0200 Subject: Get database working --- src/util/secretUtils.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/util/secretUtils.js (limited to 'src/util/secretUtils.js') diff --git a/src/util/secretUtils.js b/src/util/secretUtils.js new file mode 100644 index 0000000..33e5fef --- /dev/null +++ b/src/util/secretUtils.js @@ -0,0 +1,9 @@ +import fs from "node:fs/promises"; + +export async function readSecret(path) { + if (!path) { + throw new Error("Path to secret file is required"); + } + const content = await fs.readFile(path, "utf8"); + return content.trim(); +} -- cgit 1.5.1