[英]Running multiple apps on multiple ports through rack
I am trying to run two apps on 2 instances of thin on different ports something like 我试图在不同端口上的2个瘦实例上运行两个应用程序,例如
in config.ru
在config.ru中
run App1, port: 3000 run App2, port: 4567
how can I do this ? 我怎样才能做到这一点 ?
Since it's two apps, you can't start them simultaneously in one config.ru. 由于它是两个应用程序,因此您无法在一个config.ru中同时启动它们。
If they're separated to two apps, start them like 如果将它们分成两个应用程序,请像这样启动它们
# for App1
thin -R config.ru -a 127.0.0.1 -p 3000 start
# for App2
thin -R config.ru -a 127.0.0.1 -p 4567 start
or specify the port in config.ru
first line directly, take App1 for example 或直接在
config.ru
第一行中指定端口,以App1为例
#\ -p 3000
...
...
run App1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.