feat: Implement config system

This commit is contained in:
2026-07-06 08:02:54 +05:30
parent 496b17faf0
commit 535ed1142f
6 changed files with 164 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
import { z } from "zod";
import path from "node:path";
const CoreConfigSchema = z.object({
OMNIA_DB_PATH: z.string().default(path.join(process.cwd(), "omnia.db")),
});
export const coreConfig = CoreConfigSchema.parse(process.env);

View File

@@ -1,3 +1,7 @@
import { config } from "dotenv";
import path from "node:path";
config({ path: path.resolve(__dirname, "../.env") });
export * from "./attribute.js";
export * from "./entity.js";
export * from "./world.js";