Published: 10 Feb 2022 › Updated: 10 Feb 2022![[개발] # 2. Nest.js - command](https://i.ecency.com/p/C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPPxW4RDVTJh6X2iNNCiDFc3T4fmC8SxVw5EeJmMoymxnk3mPBAv1fiNuTciBDBaP8MBvppcvT8?format=match&mode=fit&height=377)
[개발] # 2. Nest.js - command
안녕하세요 @realmankwon입니다.
Nest.js 프로젝트에서 터미널로 명령을 할 때 사용법이 궁금하면 nest 라고 입력하면 다음과 같이 사용법이 나오게 됩니다.
만약 controller 파일을 생성하고 싶다면 Commands 에서 아래의 명령어를 참조하면 됩니다.
- generate|g [options] [name] [path] Generate a Nest element.
controller 를 나타내는 <schematic> 은 co 이니 다음과 같이 입력하면 됩니다.
- generate co
약어로도 입력이 가능한데 generate 의 약어는 g 이므로 다음과 같이 간단하게 입력해도 동일하게 동작을 하게 됩니다.
- g co
입력 후에는 생성할 controller 의 파일명을 물어보는데 입력을 하면 자동으로 관련 정보들을 작성해 줍니다.
예를들면 app.module.ts 에 controllers 에 해당 파일명을 추가시켜줍니다.
무조건 터미널에서 generate를 해야겠네요 ㅎㅎ
Leave [개발] # 2. Nest.js - command to:
Read more #sct posts
Best Posts From realmankwon
We have not curated any of realmankwon's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.