Modern.js BFF supports different runtime frameworks. Currently, Modern.js BFF supports two runtime frameworks: Express.js and Koa.js.
When using different runtime frameworks, some APIs may differ.
In BFF functions, you may need to access the request context to handle more logic. Depending on the runtime framework, you need to use different APIs:
For more details, refer to useContext.
In BFF functions, you may need to use middleware to handle more logic. Depending on the runtime framework, you need to use different APIs:
For more details, refer to hook.