我在测试示例中遇到过server.inject,但在生产代码示例中没有遇到。
我有一个路由,需要执行由另一个路由处理的东西,所以我需要进行内部调用。
handler: (req, res) => {
const OPTIONS = {
method: 'POST',
path: '/path'
payload: {PAYLOAD_HERE}
}
server.inject(OPTIONS, (err, response) => {
res(response)
});
}这样行吗?
发布于 2017-11-11 01:31:57
是。我正是在大规模生产系统中这样做的。
https://stackoverflow.com/questions/47070942
复制相似问题