本文介绍了如何为单用户设置opencpu默认端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在与opencpu合作.我将opencpu安装为单用户模式.当会话到期时,链接断开,有时端口号会动态更改.我希望每次运行期间端口都保持不变,即使当前会话已过期.
I am working with opencpu. I installed the opencpu as a single user mode. When the session is expired the link is down and sometimes the port number is changing dynamically. I would like the port to be constant during every run even the current session is expired.
推荐答案
您可以在启动单用户服务器时设置端口:
You can set the port when you start the single user server:
library(opencpu)
opencpu$stop()
opencpu$start(1234)
这将在端口1234上启动opencpu.我建议您尝试始终在端口80(http)和443(https)上运行的云服务器.
This will start opencpu on port 1234. I recommend you try the cloud server, which always runs on port 80 (http) and 443 (https).
这篇关于如何为单用户设置opencpu默认端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!