1npm i -g @nestjs/cli
2nest new project-name
3
4Alternatives
5Alternatively, to install the TypeScript starter project with Git:
6
7git clone https://github.com/nestjs/typescript-starter.git project
8cd project
9npm install
10npm run start
1import { Controller, Get } from '@nestjs/common';
2
3@Controller('/api')
4export class AppController {
5
6 @Get('/testAuth0')
7 getHello() {
8 return {
9 status: 'ok'
10 };
11 }
12
13 @Get('/health')
14 getHealthCheck() {
15 return {
16 status: 'ok'
17 };
18 }
19}
20