An example demonstrating basic usage of WebSocket subscriptions
This example app demonstrates the following:
- Creating WebSocket
Subscriptionresources - Calling
$get-ws-binding-tokenoperation on createdSubscriptions in order to get a token to bind to - Connecting to the WebSocket subscription endpoint
- Creating a
bind-with-tokenmessage to start receiving subscription notifications forSubscriptions associated with the provided token - Disconnecting from the endpoint
- Cleaning up
Subscriptions 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.
If you want to change any environment variables from the defaults, copy the .env.defaults file to .env
cp .env.defaults .envAnd make the changes you need.
Next, install the dependencies
npm installThen, run the app
npm run devThis 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