zely-js / zely

Build Productive, Convenient, Fast Backend
https://zely.vercel.app
MIT License
9 stars 1 forks source link

New base engine #345

Open do4ng opened 1 month ago

do4ng commented 1 month ago

Problems of zely-js/http

  1. No features It is literally a package that adds middleware to node:http.
  2. Not using context zely uses context, not req and res, but zely-js/http uses req and res, so context must be implemented separately in zely. (middleware still use req and res)
  3. No type-safety

Solve!

A new base engine has been developed: Senta

server.use(
  () =>
    new senta.SentaResponse({
      type: 'json',
      body: "Hello World" // typescript error: Type 'string' is not assignable to type 'JsonType'.ts(2345)
    })
);