디렉토리 구조

Setup

$ npm i -g @nestjs/cli
$ nest new project-name

src/

app.controller.ts A basic controller with a single route.
app.controller.spec.ts The unit tests for the controller.
app.module.ts The root module of the application.
app.service.ts A basic service with a single method.
main.ts The entry file of the application which uses the core function NestFactory to create a Nest application instance.

main.ts

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  await app.listen(3000);
}
bootstrap();

앱 실행하기

$ npm run start