V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zuohuadong
V2EX  ›  Node.js

更优雅的 node.js 框架 : nestjs 5.1 发布 ,支持异步动态 modules 。

  •  
  •   zuohuadong · 2018-07-19 14:45:54 +08:00 · 4258 次点击
    这是一个创建于 2079 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Nest 是构建高效,可扩展的 Node.js Web 应用程序的框架。 它使用现代的 JavaScript 或 TypeScript (保留与纯 JavaScript 的兼容性),并结合 OOP (面向对象编程),FP (函数式编程)和 FRP (函数响应式编程)的元素。

    在底层,Nest 使用了 Express,但也提供了与其他各种库的兼容,例如 Fastify,可以方便地使用各种可用的第三方插件。

    Features

    common: FileFieldsInterceptor upload multiple files with different names (multer.fields) #741 core: support async dynamic modules #800 core: exclude routes in the MiddlewareBuilder #790 core: support RouteInfo in the MiddlewareBuilder (restrict middleware to certain request method)

    forRoutes(
       { path: 'cats', method: RequestMethod.GET },
       { path: 'cats', method: RequestMethod.POST },
    )
    

    Bug Fixes

    common: empty body ends up with 500 error (ValidationPipe) #734 core: the last one of APP_ providers get registered #812 core: middleware runs more than once #779 core: custom decorators not being treated as default ones #765 microservices: allow gRPC stream cancellation #773

    Improvements

    common: expose axiosRef from HttpService#842 common: make MiddlewareFunction generic #778 microservices: propagate internal gRPC error #844 testing: type signature for TestModule.get() is too restrictive #772

    文档

    要查看 指南, 请访问 docs.nestjs.cn. books 要查看 English 指南, 请访问 docs.nestjs.com. books

    3 条回复    2019-04-26 17:19:32 +08:00
    crs0910
        1
    crs0910  
       2018-07-19 18:48:18 +08:00
    有没有覆盖比较多技术点的 example 或者 project 可以参考?
    Arylo
        2
    Arylo  
       2018-07-31 06:49:46 +08:00
    wujohns
        3
    wujohns  
       2019-04-26 17:19:32 +08:00
    nestjs 的中间件机制是真的丑
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1594 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 16:53 · PVG 00:53 · LAX 09:53 · JFK 12:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.