Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

571 B
Raw Blame
import fs from "fs";
import path from "path";

function readEnv(filePath: string) {
    const fullPath = path.resolve(__dirname, filePath);
    const content = fs.readFileSync(fullPath, "utf8");

    return Object.fromEntries(
        content
            .split("\n")
            .filter(Boolean)
            .filter(line => !line.startsWith("#"))
            .map(line => {
                const [key, ...rest] = line.split("=");
                return [key.trim(), rest.join("=").trim()];
            })
    );
}

export const DB_CREDENTIALS = readEnv(".env.for-test");