Closed aquapi closed 4 weeks ago
I know this is a way to make it more normal and I'm okay with it
.get('/', {
f: () => 'hello world'
});
but the only issue is the return type, we have one mode where we return a Response
and another one with a BodyInit
, should we stick to returning a Response
, do you like this new syntax @emastho
I know this is a way to make it more normal and I'm okay with it
.get('/', { f: () => 'hello world' });
but the only issue is the return type, we have one mode where we return a
Response
and another one with aBodyInit
, should we stick to returning aResponse
, do you like this new syntax @emastho
Well, this makes Vixeny more approachable to \<everyone>
The problem tho, it minimizes any uniqueness Vixeny had Under the hood its very unique, but to people its just "so this now just Elysia, but faster" Marketing is in shambles
Maybe if we introduce get
, post
, put
and delete
and keep stdPetition
?
My idea of a serve implementation with the new syntax would be like:
await vix(opts)()
.get({
path: "/",
f: () => new Response("hello world"),
})
.serve({
port: 8080,
});
Keeping all the current functionality, the problem I see with use
is that we already set up everything in create
@emastho should I add .serve
?
@aquapi
also, I was thinking about adding addPetition
instead of customPetition
:
await vix(opts)()
.addPetition({
path: "/",
f: () => new Response("hello world"),
})
.serve({
port: 8080,
});
and deprecate stdPetition
, there's little use for it and it's confusing, keeping a Response as the object to return keeps consistency.
I know this is a way to make it more normal and I'm okay with it
.get('/', { f: () => 'hello world' });
but the only issue is the return type, we have one mode where we return a
Response
and another one with aBodyInit
, should we stick to returning aResponse
, do you like this new syntax @emasthoWell, this makes Vixeny more approachable to
The problem tho, it minimizes any uniqueness Vixeny had Under the hood its very unique, but to people its just "so this now just Elysia, but faster" Marketing is in shambles
Not really though, every framework nowadays look like this. The major differences often are TypeScript support and request lifecycle
Well we actually don't have a life cycle but a resolution , and it's end-to-end safe with TS support for deno, bun and focused on jsr.
There are things that are really difficult to change because this structure but also has a lot of advantage and it's specially easy to test and scale.
Here's the new API design I'm thinking of that might looks more ergonomic. So instead of:
We can use: