Hi - Is there an example of how to write a REST cl...
# dev
m
Hi - Is there an example of how to write a REST client without using Vite or React? I would like to try to write a pure typescript client for what will be a backend process for us, but I am not able to get it to build.
r
the client defintely works in the backend, for example our Bots use it. For example: https://github.com/medplum/medplum/blob/main/examples/medplum-demo-bots/package.json Uses https://www.npmjs.com/package/@medplum/core
m
Thanks for answering... The difference I see there is that it is using vite and I am not. I will try to see if I can get it to work by copying that.
r
@mitch_83302 this just usese vite forst testing. The Core medplum library does not take a dependency on vite
m
The issue I am having is that I see the core does use a reference to the Storage class. This is a browser-only construct. The error I get is
What I am trying to do is just use medplumClient.startLogin({ email: "mgolden@mitchgolden.com", password: "...", }); and see the response.
@rahul1 ^
r
@mitch_83302 , would you mind migrating this over to our #1094022380659155005 forum. That's teh best place for these kinds fo questions
m
OK
174 Views