1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

NestJSのインストール〜新規プロジェクト作成方法

Posted at

NestJSのインストール〜新規プロジェクトの作成方法

NestJSの議事録を残すための記事です。

NestJSとは

こちらの記事が詳しく記載してくれています。
NestJSのススメ ~Expressを超えてゆけ~
公式サイト
https://docs.nestjs.com/

NestJSのインストール

npm i -g @nestjs/cli

インストールの確認

nest --version
7.1.5

新規プロジェクトの作成

nest new nest-test-project
⚡  We will scaffold your app in a few seconds..

CREATE nest-test-project/.eslintrc.js (599 bytes)
CREATE nest-test-project/.prettierrc (51 bytes)
CREATE nest-test-project/README.md (3370 bytes)
CREATE nest-test-project/nest-cli.json (64 bytes)
CREATE nest-test-project/package.json (1905 bytes)
CREATE nest-test-project/tsconfig.build.json (97 bytes)
CREATE nest-test-project/tsconfig.json (336 bytes)
CREATE nest-test-project/src/app.controller.spec.ts (617 bytes)
CREATE nest-test-project/src/app.controller.ts (274 bytes)
CREATE nest-test-project/src/app.module.ts (249 bytes)
CREATE nest-test-project/src/app.service.ts (142 bytes)
CREATE nest-test-project/src/main.ts (208 bytes)
CREATE nest-test-project/test/app.e2e-spec.ts (630 bytes)
CREATE nest-test-project/test/jest-e2e.json (183 bytes)

? Which package manager would you ❤️  to use? (Use arrow keys) # 好きな方のパッケージマネージャーを選ぶ
❯ npm
  yarn 
✔ Installation in progress... ☕

🚀  Successfully created project nest-test-project
👉  Get started with the following commands:

$ cd nest-test-project
$ npm run start

アプリケーションの起動

インストール完了時に出たコマンドをそのまま実行

cd nest-test-project
npm run start

> nest start

[Nest] 98853   - 2020/05/16 19:13:18   [NestFactory] Starting Nest application...
[Nest] 98853   - 2020/05/16 19:13:18   [InstanceLoader] AppModule dependencies initialized +11ms
[Nest] 98853   - 2020/05/16 19:13:18   [RoutesResolver] AppController {}: +5ms
[Nest] 98853   - 2020/05/16 19:13:18   [RouterExplorer] Mapped {, GET} route +3ms
[Nest] 98853   - 2020/05/16 19:13:18   [NestApplication] Nest application successfully started +2ms

起動確認

http://localhost:3000 にアクセスし、下記画面が表示されればOK!

スクリーンショット 2020-05-16 19.15.36.png

最後に

初投稿のため、愛想のない文字列が並んだだけになったような。。。
これから、勉強の内容を色々投稿していこうと思う。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?