Skip to content

Instantly share code, notes, and snippets.

@nicobytes
Last active February 18, 2022 02:59
Show Gist options
  • Save nicobytes/4b462079314a3759f107b735268c07f0 to your computer and use it in GitHub Desktop.
Save nicobytes/4b462079314a3759f107b735268c07f0 to your computer and use it in GitHub Desktop.
NestJS, TypeORM and PostgreSQL
npm install --save @nestjs/typeorm typeorm pg
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { configService } from './config/config.service';

@Module({
  imports: [
    TypeOrmModule.forRoot(configService.getTypeOrmConfig())
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment