Websockets implementation (or any realtime communication) on route.ts #76306
nelrafa103
started this conversation in
Ideas
Replies: 1 comment
-
Instead of a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
1.Make posible to use socket's without need of using any external library
2.Avoid the use of the next() server function
3.Reduce the dependecies
Non-Goals
1.Increase the difficulty to learn the framework
2.Increase the bundle size
3.
Background
There is not "simple" way to implement any protocol apart from the RESTful protocol, that said, I think that limit very much what you can just with the framework. There is so many think that websocket could be a better choice than traditional REST, like realtime searching, a chat. etc....
Proposal
I think that somethin like this would be nice:
`"use socket"
export default function handler(event) {
.....
} `
Beta Was this translation helpful? Give feedback.
All reactions