inSpring
V2EX  ›  Node.js

有朋友在用 Hono 吗?相比 Koa、Fastify 的有哪些缺点?

  •  
  •   inSpring · Sep 24, 2024 · 5608 views
    This topic created in 619 days ago, the information mentioned may be changed or developed.

    用了一周 Honojs ,相比 Fastify 文档更整洁,honojs 用起来也很简单。

    之前没有深度使用过 Koa 、Fastify 这两个框架。想知道 Honojs 相比前辈有哪些缺点?

    14 replies    2024-09-26 12:31:09 +08:00
    Gilfoyle26
        1
    Gilfoyle26  
       Sep 24, 2024
    Honojs 貌似前几天很火的帖子,上说的 rsshub 现在就是在用这个。
    只是了解了一下,感觉配合 cloudflare 的服务 还不错,至于其他的没有过多了解。
    txx
        2
    txx  
       Sep 24, 2024
    和 Golang 的 Gin 接口都差不多,在我不想开个 Golang 项目的时候,我就用 Hono 来搞一搞了,基本上文档都不用看 连蒙带猜的就能写出来。
    YUyu101
        3
    YUyu101  
       Sep 24, 2024
    如果不是为了上 cloudflare 感觉没必要特意使用
    Jaufey
        4
    Jaufey  
       Sep 24, 2024 via iPhone
    说个丢人的,我 hono 拉了好几次没拉下来🤡
    inSpring
        5
    inSpring  
    OP
       Sep 24, 2024
    @txx 看了下,确实和 Gin 差不多。
    inSpring
        6
    inSpring  
    OP
       Sep 24, 2024
    @YUyu101 不上 cloudflare 的话,你用哪个 Web 框架?
    inSpring
        7
    inSpring  
    OP
       Sep 24, 2024
    @WhateverYouLike 为什么?网络问题吗?
    flmn
        8
    flmn  
       Sep 25, 2024
    hono 能适应更多的运行时,比如 edge 的
    liuzhaowei55
        9
    liuzhaowei55  
       Sep 25, 2024 via Android
    @WhateverYouLike 同,字节的 modernjs 也有类似问题,感觉是创建项目时内部没有使用系统 proxy 变量
    testdoge
        10
    testdoge  
       Sep 25, 2024
    同问,我也不是 cloudflare 的深度用户,我确实不太明白为啥最近 honojs 这么火。

    我还是老一派 用 express koa 多 😑
    CHTuring
        11
    CHTuring  
       Sep 25, 2024
    @testdoge #10 因为上手快,中间件都有,很快就能出一个小项目。公司要写一个短链,1 个小时就写完了。
    liuliancc
        12
    liuliancc  
       Sep 25, 2024
    支持 rpc ,喜欢 typescript 的太爽了
    dt201909
        13
    dt201909  
       Sep 25, 2024
    @testdoge #10 因为支持多平台吧,迁移成本比较低
    YUyu101
        14
    YUyu101  
       Sep 26, 2024
    @inSpring #6 只写后端用 nestjs ,全栈喜欢 react 用 next 或者 remixjs ,喜欢 vue 用 nuxt
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2473 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 00:45 · PVG 08:45 · LAX 17:45 · JFK 20:45
    ♥ Do have faith in what you're doing.