Imagine a chat server persisting the messages, a simplified Slack chat. The domain is designed in the object-orientated style. In order to get realtime updates, we need to transport events emitted on the model constructor ("static" events) and on a model instance ("instance" events).
While it may not be immediately clear, the example is covering few other important LoopBack concepts too:
- authorization (
loopback.token
in REST) - current context (
loopback.context
in REST)
What is not covered:
- file uploads and downloads