feat: Use MongoDB to save the datalake

This commit is contained in:
Lucàs
2024-11-11 23:09:59 +01:00
parent cde872ca55
commit 6975765e18
36 changed files with 862 additions and 517 deletions
+8 -2
View File
@@ -1,11 +1,17 @@
import dotenv from "dotenv";
import Server from "./Server";
import { DatasetCollection } from "./services/dataset";
import { AppDataSource } from "./AppDataSource";
import { TypeOrmDataSource } from "./TypeOrmDataSource";
dotenv.config();
AppDataSource.initialize()
// 1. initialize database connexions
// 2. Load all datasets
// 3. Start the server
TypeOrmDataSource.initialize()
.then(() => DatasetCollection.loadAll())
.then(() => console.log("All datasets are loaded"))
.then(() => new Server().start())