将API代码从整体转移到微服务的工具
目前,我们正在将代码从整体转移到不同的微服务。有2个巨石使用Express,另一个使用Nodejs的帆。此时,我已经将一些API移至其中一项服务。但是,我注意到,每个API手动将代码从整体复制到微服务。请注意,我们没有在整体中使用所有单个方法中的类。
我觉得可能有将相关代码从一个存储库移至另一个存储库的工具。我假设我输入存储库和API的启动功能该工具应该能够检测执行对API的任何调用所需的所有功能,并且应该能够将其移至微服务。如果没有这样的工具,我可以用什么来为我的用例构建一个工具,或者我过度简化了问题,最好将复制粘贴代码从一个存储库复制到另一个存储库,然后对其进行重构。
We are currently in the process of moving code from our monoliths to different micro-services. There are 2 monoliths one using express, the other using sails on top of nodejs. I have already moved a few APIs at this point to one of the services. However I notice that it takes a lot of time copying code from the monolith to the micro-service manually for each API. Note that we are not using classes in the monolith, its all individual methods.
I feel there might be tools for moving relevant code from one repo to another. I am assuming say I input the repository and the starting function for an API the tool should be able to detect all functions required for executing any call made to the API and should be able to move them to the micro-service. If there are no such tools what can I use to build one for my use case, or am I oversimplifying the problem and am better off copy pasting code from one repo to another and then refactoring it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论