2023-04-07 03:12:54 +02:00
|
|
|
/** Load the app. */
|
|
|
|
const start_app = () => {
|
|
|
|
import("./load").then((l) => l.run().catch((error) => console.error(error)));
|
2022-07-20 23:01:47 +02:00
|
|
|
};
|
|
|
|
|
2023-04-07 03:12:54 +02:00
|
|
|
// Load .env if not in prod
|
|
|
|
if (process.env.NODE_ENV !== "production") {
|
|
|
|
// 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();
|
|
|
|
}
|