正在加载视频...
视频加载失败
🌶️ Express is the new JQuery. Let me explain! #WhiteboardTheWeb edition 115
74,559 次观看 • 3 年前 •via X (Twitter)
31 条评论

Hono.js is the way forward here, uses all these standards and adds the nice route matching and shortcut response methods you'd expect from express. Works on every JS runtime

@honojs is great, should try it out

For large scale apis, or micro services, I still prefer NestJs. Hono or fastify, for small scale stuff.

And theres the fact that I didn't know Express was unmaintained until halway through personal project that used it

@fastifyjs is also a modern, faster and complete alternative to Express

@fastifyjs I had two choices: Name drop Hono, get fastify comments Name drop fastify, get Hono comments They're both great but I picked what I know 😅

@hernan_yadiel @fastifyjs Why not name drop both

@itsmebunk @hernan_yadiel @fastifyjs I wanted a code example and only have 60 seconds 😡

good point, i like fastify more though

There's 3 options I like : - Hono - H3 - Hattip There's a bunch of new options popping up in the deno and bun ecosystem too !

If you want even more flexibility (and fewer bytes), there's also the 450 byte itty-router. Also less opinionated, gives you 100% control of the flow, and route code is even shorter. But if hono fits your style (more express-like), highly recommend it!

This is lovely! One of the benefits of standards is that Request Response is now portable across environments

I wrote some logic that lets you use Request and Response within Express for use with @nextauthjs’ new Auth handler. I think it’s great that node libs like Auth.js are converging on these Web API standards. Thanks for the breakdown of the possibilities!

How’s Typescript support for Hono?

Fantastic! It even has type inferencing for params based on the endpoint: get('/users/:id', (c) => c.params // typed as { id: string }

Very nice 👌

I have great expectations for @fastifyjs at this point :)

Such an amazing explanation one of the best I have seen on this topic ✨️

What do u make of NestJs

Is backend JS runtime portability really possible (like once you get things like AWS involved) or desirable and whyyy

Just avoiding vendor lock-in with the tools I choose. Though I'll admit providers like cloudflare have preeeetty nice base APIs

Idk man. Need to temper that line with some consideration for what happens when a database gets involved

my dude. PLEASE take a deeper dive into tech. hono is Koa. you just described Koa. I get that new stuff is exciting and you want to keep growing the base, but it's frustrating to see the new generation ignoring (or remaining ignorant to) prior art.

Except no routing, middleware, auto body parsing and all the things people reach for a framework for lol

I love @honojs 😍

… I don’t hate this take

Love the torches seller 🤣

Express was just a Sinatra clone; that was the standard. In fact, everything in early Node was just copying everything from Ruby line for line. Either way, I get what you're saying.

Who’s using express on the client? I wanna know how the fuck you managed that 😆

that doesn't make a lick of sense

FYI, URLSearchParams is not designed for that. It's actually designed for <form />
