typicode / json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Other
73.02k stars 7.02k forks source link

Socket support #288

Open zsherman opened 8 years ago

zsherman commented 8 years ago

Not sure if anyone else would find this useful, but I would love the ability to be able to connect to a socket and send arbitrary data from the mock server.

sant123 commented 8 years ago

:+1: +1

wingsuitist commented 8 years ago

A simple solution for the start would be that the websocket fires an event when any data is updated. This way you would at least know if you had to reload the data.

pantchox commented 7 years ago

i am also interested in this, can there be a event listener on lowdb then change happens to specific "find" or a query?

andys8 commented 7 years ago

This feature would be awesome. Looking at Custom routes example it should be possible to integrate a websocket server implementation, too, right?

davidlivingrooms commented 5 years ago

This would also be very useful for event streams!

pantchox commented 5 years ago

its very unclear what your solution is doing, how is the rewriter related to the WS?

pantchox commented 5 years ago

its very unclear what your solution is doing, how is the rewriter related to the WS?

this was originally a question to someone who posted a code, but it got deleted.