Isaac Kam's Blog

I am a slow walker, but I never walk backwards.

nest中你可以看到使用装饰器实现路由路径。

1
2
3
4
5
6
7
8
9
10
import { Controller, Get, Query } from '@nestjs/common';
import { ListAllEntities } from './dto';

@Controller('cats')
export class CatsController {
@Get()
findAll(@Query() query: ListAllEntities) {
return `This action returns all cats (limit: ${query.limit} items)`;
}
}
阅读全文 »
0%