mirror of
https://github.com/sortedcord/omnia.git
synced 2026-07-22 03:52:48 +05:30
feat: Implement config system
This commit is contained in:
8
packages/core/src/config.ts
Normal file
8
packages/core/src/config.ts
Normal 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);
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user