如何在 feathers.js 中创建应用程序模块?

How to create application module in feathers.js?

我想构建一个可以包含许多模块的应用程序。我想以可重用但可配置的方式构建应用程序,我可以根据 npm 包配置指定启用哪些模块。

例如,我的应用程序是关于 ERP 系统的。 ERP 系统可能有 HR、PayRoll、Sales 等模块。我想用feathers JS实现上面的效果

我查看了 https://docs.feathersjs.com/api/express.html#sub-apps 但不清楚。

可以要求 Feathers generator already sets every service you create up to be configurable individually. Each service e.g. the chat message service is self contained. Just as the generator sets it up 然后通过 app.configure 调用添加(也可以是有条件的)。