soon530 / nestjs-study

來學一下nestjs吧!
0 stars 0 forks source link

開新專案nest new #4

Open soon530 opened 2 years ago

soon530 commented 2 years ago

官網都是nest new project-name的例子,不過我已經有nestjs-study的folder了,所以我先到folder下去,直接用nest new .來產生專專案。

另選用yarn來當套件管理工具。

% nest new .
⚡  We will scaffold your app in a few seconds..

CREATE .eslintrc.js (665 bytes)
CREATE .prettierrc (51 bytes)
CREATE README.md (3340 bytes)
CREATE nest-cli.json (118 bytes)
CREATE package.json (1997 bytes)
CREATE tsconfig.build.json (97 bytes)
CREATE tsconfig.json (546 bytes)
CREATE src/app.controller.spec.ts (617 bytes)
CREATE src/app.controller.ts (274 bytes)
CREATE src/app.module.ts (249 bytes)
CREATE src/app.service.ts (142 bytes)
CREATE src/main.ts (208 bytes)
CREATE test/app.e2e-spec.ts (630 bytes)
CREATE test/jest-e2e.json (183 bytes)

? Which package manager would you ❤️  to use? yarn
✔ Installation in progress... ☕

🚀  Successfully created a new project
👉  Get started with the following commands:

$ cd .
$ yarn run start

                                                       Thanks for installing Nest 🙏
                                              Please consider donating to our open collective
                                                     to help us maintain this package.

                                            🍷  Donate: https://opencollective.com/nest
soon530 commented 2 years ago

好棒棒,馬上就跑起來了!

 % yarn run start
yarn run v1.22.19
warning ../../package.json: No license field
$ nest start
[Nest] 51951  - 10/31/2022, 2:24:29 PM     LOG [NestFactory] Starting Nest application...
[Nest] 51951  - 10/31/2022, 2:24:29 PM     LOG [InstanceLoader] AppModule dependencies initialized +40ms
[Nest] 51951  - 10/31/2022, 2:24:29 PM     LOG [RoutesResolver] AppController {/}: +3ms
[Nest] 51951  - 10/31/2022, 2:24:29 PM     LOG [RouterExplorer] Mapped {/, GET} route +2ms
[Nest] 51951  - 10/31/2022, 2:24:29 PM     LOG [NestApplication] Nest application successfully started +1ms