Tinup Core supports using the mode parameter to distinguish between different environment configurations.
When starting the service, the corresponding environment file will be loaded according to the current mode. For example:
- When
mode=dev,.env.devwill be loaded - When
mode=prod,.env.prodwill be loaded - If mode is not set,
.envwill be loaded
You can switch between environments by setting the environment variable or specifying mode in the code.
pnpm run dev --mode=xxx