Extending rest server with endpoints in custom app

Hi, I’m currently writing a custom dApp. But when it came to extending the cli rest server with my own custom endpoints I couldn’t find a way to do it properly. I ended up with modifying code in the cosmos sdk dependency.

I managed to put the implementation of the endpoints in my own package, but then had to register them in vendor/github.com/cosmos/client/lcd/root.go in the createHandler function. Is there any recommended way to register your own routes without meddling with dependency code?

1 Like