Skip to content

medplum/medplum-websocket-subscriptions-demo

Repository files navigation

Medplum WebSocket Subscription Demo

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 created Subscriptions 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 for Subscriptions associated with the provided token
  • Disconnecting from the endpoint
  • Cleaning up Subscriptions after finishing the session

Getting Started

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 .env

And make the changes you need.

Next, install the dependencies

npm install

Then, run the app

npm run dev

This app should run on http://localhost:3000/

About Medplum

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published