Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我读到机架中间件是为了修改当前的请求/响应,但是如果有一个 SendEmail 中间件可以env['user_id']用来发送电子邮件呢?
env['user_id']
让我们假设整个过程(请求 + 发送电子邮件)将是异步的。
如果您真的想在 Goliath 中执行此操作,我建议您创建一个插件并在其中执行此操作。在配置中创建一个队列,让插件从队列中弹出项目并发送邮件。