feat:mvp1 initial commit

This commit is contained in:
Oracle Public Cloud User
2024-11-21 06:07:08 +00:00
commit 05872b5170
100 changed files with 18936 additions and 0 deletions

20
typeorm.cli.ts Normal file
View File

@ -0,0 +1,20 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './src/app.module';
import { DataSource } from 'typeorm';
/**
* Getting data source through NestJS app helps in getting entities dynamically with "autoLoadEntities" NestJS feature
* as well as keeping migrations config in sync with what is configured in the app.
*/
async function getTypeOrmDataSource() {
process.env.MIGRATIONS_RUN = 'false';
const app = await NestFactory.createApplicationContext(AppModule);
const dataSource = app.get(DataSource);
await app.close();
return dataSource;
}
export default getTypeOrmDataSource();