DEV Community

Discussion on: Stop using Swagger-UI and MSW, but SDK instead

Collapse
 
beenotung profile image
Beeno Tung

You may try "npm init rpc", it's also generate client sdk based on server implementation. You don't need to specific the interface in multiple places with it.

Thread Thread
 
fyodorio profile image
Fyodor

That's interesting. Do you use it for something? What does it make under the hood actually? The package and repo look quite weird and obscure.

Thread Thread
 
beenotung profile image
Beeno Tung

I use the create-* package to generate the skeleton of backend server, and it generates the typescript client on the fly.
I can then use the client sdk in SPA (angular or react).
I know there are at least 10+ e-commerce projects based on this design (booking, office automation, e-shop, e.t.c.)