NestJs typeORM으로 MySQL 연결, 2024-01-29

sunj - Jan 29 - - Dev Community

src아래에 configs 폴더 생성
configs아래에 typeorm.config.ts 생성

import { TypeOrmModuleOptions } from "@nestjs/typeorm";

export const typeORMConfig : TypeOrmModuleOptions = {
    type: 'mysql',
    host: 'localhost',
    port: 3306,
    username: '',
    password: '',
    database: '',
    entities: [__dirname + '/../**/*.entity.{js,ts}'],
    synchronize: true
}
Enter fullscreen mode Exit fullscreen mode

참조 : https://www.youtube.com/watch?v=3JminDpCJNE&t=13257s

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player