Json-server: Socket support

Created on 13 May 2016  路  7Comments  路  Source: typicode/json-server

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.

Most helpful comment

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.

All 7 comments

:+1: +1

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.

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

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

This would also be very useful for event streams!

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

goldmont picture goldmont  路  3Comments

casvil picture casvil  路  4Comments

boydenhartog picture boydenhartog  路  3Comments

AdamCook44 picture AdamCook44  路  3Comments

zenith77 picture zenith77  路  3Comments