Revert "Revert "[4/n]: migrate the RESTAPI GET /rest/* to use TwentyORM direc…" (#11349)

This commit is contained in:
martmull
2025-05-12 10:32:04 +02:00
committed by GitHub
parent 1f4d4c5265
commit 650f8f5963
50 changed files with 1532 additions and 698 deletions

View File

@ -1,6 +1,8 @@
import { JestConfigWithTsJest } from 'ts-jest';
import 'tsconfig-paths/register';
import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource';
import { createApp } from './create-app';
export default async (_, projectConfig: JestConfigWithTsJest) => {
@ -10,7 +12,10 @@ export default async (_, projectConfig: JestConfigWithTsJest) => {
throw new Error('No globals found in project config');
}
await rawDataSource.initialize();
await app.listen(projectConfig.globals.APP_PORT);
global.app = app;
global.testDataSource = rawDataSource;
};