diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..07df5a6 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,15 @@ +import { config as configDotenv } from 'dotenv'; + +configDotenv(); +export const config = { + internal_port: parseInt(process.env.APP_PORT) || 4010, + development: process.env.NODE_ENV === "production" +} +let errors = 0 +if (typeof config.internal_port !== "number") { + errors++ +} +if (typeof config.development !== "boolean") { + errors++ +} +export let e = errors \ No newline at end of file