mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-23 05:01:05 +10:00
Setup TypeORM
This commit is contained in:
@ -1,9 +1,22 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { CoreModule } from './core/core.module';
|
||||
import { EnvironmentModule } from './environment/environment.module';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { AppDataSource } from './database/typeorm.config';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
imports: [
|
||||
CoreModule,
|
||||
EnvironmentModule,
|
||||
TypeOrmModule.forRoot({
|
||||
...AppDataSource.options,
|
||||
entities: ['dist/src/**/*.entity.ts'],
|
||||
migrations: ['dist/src/**/migrations/*.{ts,js}'],
|
||||
autoLoadEntities: true,
|
||||
}),
|
||||
],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user