metarhia / jstp

Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
https://metarhia.github.io/jstp
Other
142 stars 10 forks source link

server: add a way to update API #309

Closed nechaido closed 6 years ago

nechaido commented 6 years ago

@lundibundi

Is there any need to use .call method in there? I think it'll be much better to either return _cachedVersions and applications from a function or pass server as a regular parameter to a function

Yeah, that makes sense.

Maybe we should also add a method to change specific version's application, as it'll probably be more useful?

This functionality is mainly for adding new applications or versions. Moreover, you should never change existing version's API, add a new version instead.

lundibundi commented 6 years ago

This functionality is for mainly for adding new applications or versions. Moreover, you should never change existing version's API, add a new version instead.

@nechaido Well that's why a separate method to add new versions or applications is preferable to the one that requires you to pass all existing ones. The one I mentioned will allow you to do just that.

nechaido commented 6 years ago

@lundibundi please feel free to add described functionality in a follow-up PR. I would prefer to keep this PR simple so that we land it ASAP because the implemented functionality is critically needed to integrate JSTP with Impress.

lundibundi commented 6 years ago

@nechaido Oh, that's the reason behind this PR. Then it's okay with me.

nechaido commented 6 years ago

Landed in d5cb305e31abd995351b59de22cecc22f3212e6b.