2023-12-31 11:11:22 +00:00
|
|
|
import populateDatabase from "../tests/populateDatabase";
|
|
|
|
import { startApp } from "./app";
|
2023-12-25 06:47:16 +00:00
|
|
|
|
2023-12-31 11:11:22 +00:00
|
|
|
await startApp();
|
2023-12-25 06:47:16 +00:00
|
|
|
|
2023-12-31 12:26:10 +00:00
|
|
|
// This try carch is to prevent hot reload from making the process die due to coliding entries
|
2023-12-31 11:11:22 +00:00
|
|
|
try {
|
2023-12-31 12:26:10 +00:00
|
|
|
// Not insert test data into production
|
|
|
|
if (process.env.NODE_ENV != "production"){
|
|
|
|
await populateDatabase();
|
|
|
|
}
|
2023-12-31 11:11:22 +00:00
|
|
|
} catch {}
|