엔티티를 추가하면 개발에서는 동작하지만 운영 배포 시 테이블이 생성되지 않는 구조적 결함이 있었다. app.module 은 운영에서 migrationsRun 을 켜두었지만 마이그레이션을 만들 수단(DataSource·CLI 스크립트·디렉터리)이 전혀 없었고, 규칙 문서도 "운영에서는 마이그레이션이 강제된다"는 원칙만 있고 절차가 없었다. - CLI 전용 DataSource(src/data-source.ts)와 migration:* 스크립트 추가. ts-node 에 tsconfig-paths 를 등록해 엔티티가 @/ alias 를 써도 동작한다. - DB 접속 설정을 database.config.ts 로 모아 앱과 CLI 가 공유하게 함. 두 곳에 나눠 적으면 반드시 어긋난다. - synchronize 기본값을 false 로 변경 (DB_SYNCHRONIZE=true 로 개발 한정 opt-in). 켜져 있으면 개발 DB 가 항상 최신이라 migration:generate 가 "변경 없음"만 내놓아 마이그레이션을 만들 수 없다 — 이것이 위 결함의 직접 원인이었다. 운영에서는 이 값과 무관하게 항상 비활성화된다. - 엔티티 추가 절차와 주의사항(생성 SQL 검토, 커밋 후 수정 금지)을 문서화하고 커밋 전 체크리스트에 스키마 변경 항목 추가. generate → run → revert 전 과정을 임시 엔티티로 검증했다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A progressive Node.js framework for building efficient and scalable server-side applications.
Description
Nest framework TypeScript starter repository.
Project setup
$ npm install
Compile and run the project
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Run tests
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Deployment
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.
If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
$ npm install -g @nestjs/mau
$ mau deploy
With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
Resources
Check out a few resources that may come in handy when working with NestJS:
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
- Looking for a job, or have a job to offer? Check out our official Jobs board.
Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
License
Nest is MIT licensed.