[英]Kue UI (Express) parallel to Hapi.JS API-Server
I want to use the UI from Kue ( https://github.com/Automattic/kue ) parallel to my Hapi.js Application. 我想使用Kue( https://github.com/Automattic/kue )与我的Hapi.js应用程序并行的UI。
The Kui UI is build with Express. Kui UI是用Express构建的。
Hapi and Express are listening on port 80 on my heroku dyno. Hapi和Express正在我的heroku dyno上听80号端口。
How can I do that? 我怎样才能做到这一点? Can someone give me an example?
有人能举个例子吗?
The post is lacking a bit of details but I think I understand what you want. 这篇文章缺乏一些细节,但我想我明白你想要什么。 I will assume that both services run on the same IP@ so you obviously can't have them both on port 80.
我将假设两个服务都在相同的IP @上运行,所以你显然不能在端口80上同时使用它们。
I think a possible solution is to start kue
on another port (say 4080) and have hapi.js proxy the kue
routes to the kue
server. 我认为一个可能的解决方案是在另一个端口(例如4080)上启动
kue
并让hapi.js代理到kue
服务器的kue
路由。
The relevant document section is here (look for the proxy
option). 相关文档部分在此处 (查找
proxy
选项)。 There is a sample here . 有一个样品在这里 。
Hope I got your question right. 希望我的问题是正确的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.