mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-07-09 12:07:45 +00:00
19 lines
468 B
TypeScript
19 lines
468 B
TypeScript
import dotenv from "dotenv";
|
|
import Server from "./Server";
|
|
import { DatasetCollection } from "./services/dataset";
|
|
import { TypeOrmDataSource } from "./TypeOrmDataSource";
|
|
|
|
dotenv.config();
|
|
|
|
// 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())
|
|
.catch(console.error);
|