Skip to content

Instantly share code, notes, and snippets.

@imflamboyant
Created May 4, 2022 08:51
Show Gist options
  • Select an option

  • Save imflamboyant/efdd5aa203d89812e6f34d34cb212953 to your computer and use it in GitHub Desktop.

Select an option

Save imflamboyant/efdd5aa203d89812e6f34d34cb212953 to your computer and use it in GitHub Desktop.
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SongModule } from './song/song.module';
@Module({
imports: [
TypeOrmModule.forRoot({
type: 'mysql',
host: 'localhost',
port: 3306,
username: 'root',
password: 'xxx',
database: 'songsapi',
autoLoadEntities: true,
}),
SongModule,
],
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