TypeScript 로 작성된 객체 관계형 매퍼 라이브러리이다.
npm install mysql2 typeorm @nestjs/typeorm --save
TypeORM NestJS 공식문서
Documentation | NestJS - A progressive Node.js framework
// typeorm.config.ts
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
export const typeORMConfig: TypeOrmModuleOptions = {
type: 'mysql',
host: '192.168.64.2',
port: 3306,
username: 'hyung',
password: '비번',
database: 'BoardProject',
entities: [__dirname + '/../**/*.entity.{js.ts}'],
synchronize: true,
};