Mylloon
fdc081fd6d
All checks were successful
Publish latest version / build (push) Successful in 1m32s
Close #161 Reviewed-on: #168 Co-authored-by: Mylloon <kennel.anri@tutanota.com> Co-committed-by: Mylloon <kennel.anri@tutanota.com>
19 lines
434 B
TypeScript
19 lines
434 B
TypeScript
const isDev = process.env.NODE_ENV !== "production";
|
|
|
|
/** Load the app */
|
|
const start_app = () => {
|
|
import("./load").then((l) => l.run(isDev).catch((error) => console.error(error)));
|
|
};
|
|
|
|
// Load .env if not in prod
|
|
if (isDev) {
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore
|
|
import("dotenv").then((c) => {
|
|
c.config({ path: "./config/.env" });
|
|
|
|
start_app();
|
|
});
|
|
} else {
|
|
start_app();
|
|
}
|