如何评价nest.js?

Views :
Update time : 2025-06-21 11:45:12

反对 @RaySong 的回答。

从 Decorater 不能作用于 function 开始, Nest 就注定是失败的.这个前提就是不准确的。

NestJS 的核心是基于 面向对象和依赖注入的,用类来定义Module、Controller、Service、Guard、Pipe之类的组件。

decorator 在 NestJS 中的作用主要在:告诉框架这个类/方法/属性是什么角色。

(@Controller(),@Injectable(),@Get() )依赖注入。

用的多的包括 @Inject() ,或者构造函数参数类型提示。

@UseGuards(),@UsePi…。

如何评价nest.js?
Related News
Read More >>
Blog Post With Youtube Video 用PHP写了个小框架,怎么才能得到大佬们的指点?
2025-06-28 18:05:11
用PHP写了个小框架,怎么才能得到大佬们的指点?...
Blog Post With Youtube Video 小米 YU7的3分钟20万辆订单是真的吗?
2025-06-28 18:25:11
小米 YU7的3分钟20万辆订单是真的吗?...
Blog Post With Youtube Video 人工智能相关专业里有什么「坑」吗?
2025-06-28 18:35:10
人工智能相关专业里有什么「坑」吗?...
Blog Post With Youtube Video 做个web服务器,gin框架和go-zero怎么选?
2025-06-28 17:05:11
做个web服务器,gin框架和go-zero怎么选?...

Leave Your Message