An example demonstrating basic usage of WebSocket subscriptions
This example app demonstrates the following:
- Creating WebSocket
Subscription
resources - Calling
$get-ws-binding-token
operation on createdSubscription
s in order to get a token to bind to - Connecting to the WebSocket subscription endpoint
- Creating a
bind-with-token
message to start receiving subscription notifications forSubscription
s associated with the provided token - Disconnecting from the endpoint
- Cleaning up
Subscription
s after finishing the session
If you haven't already done so, follow the instructions in this tutorial to register a Medplum project to store your data.
Fork and clone the repo.
Next, install the dependencies
npm install
Then, run the app
npm run dev
This app should run on http://localhost:3000/
Medplum is an open-source, API-first EHR. Medplum makes it easy to build healthcare apps quickly with less code.
Medplum supports self-hosting, and provides a hosted service. Medplum Hello World uses the hosted service as a backend.
- Read our documentation
- Browse our react component library
- Join our Discord