Skip to content

Instantly share code, notes, and snippets.

@Vivek205
Created October 4, 2022 11:28
Show Gist options
  • Save Vivek205/9a55762627d02fb17c7555aaf3e853fa to your computer and use it in GitHub Desktop.
Save Vivek205/9a55762627d02fb17c7555aaf3e853fa to your computer and use it in GitHub Desktop.
The root module of the application
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TasksModule } from './tasks/tasks.module';
@Module({
imports: [
TasksModule,
TypeOrmModule.forRoot({
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'postgres',
password: 'postgres',
database: 'task-management',
autoLoadEntities: true,
synchronize: true,
}),
],
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment