Environment config
Config folder
.
└── config
├── ci.ts
├── index.ts
├── local.ts
├── production.ts
├── shared.ts
└── staging.tsimport { SharedConfig } from "./shared";
import { local } from "./local";
import { ci } from "./ci";
import { staging } from "./staging";
import { production } from "./production";
export interface Config extends SharedConfig {
env: "local" | "ci" | "staging" | "production";
}
export const config: Config = { local, ci, staging, production }[
process.env.CONFIG_ENV || "local"
];import { sharedConfig } from "./shared";
import { Config } from "./index";
export const local: Config = {
...sharedConfig,
env: "local"
};Making it work on Windows
DotEnv file
Last updated