如果您正在使用hug命令行脚本启动应用程序,-p / port选项将使您到达该位置,如hug port 5000 -f app.py:
$ hug help
usage: hug [-h] [-v] [-f FILE] [-m MODULE] [-p PORT] [-n] [-ma] [-i INTERVAL]
[-c COMMAND]
Hug API Development Server
optional arguments:
-h, help show this help message and exit
-v, version show program's version number and exit
-f FILE, file FILE file
-m MODULE, module MODULE
module
-p PORT, port PORT A Whole number
-n, no_404_documentation
Providing any value will set this to true
-ma, manual_reload Providing any value will set this to true
-i INTERVAL, interval INTERVAL
A Whole number
-c COMMAND, command COMMAND
command
如果您正在使用
hug
命令行脚本启动应用程序,-p / port
选项将使您到达该位置,如hug port 5000 -f app.py
:在
app.py
(或其他名称)文件末尾添加:在8005端口上服务
您可以使用Gunicorn为hug应用程序提供服务,并使用-b标志绑定到不同的端口。在
gunicorn reload myapp:__hug_wsgi__ -b0.0.0.0:8008
相关问题 更多 >
编程相关推荐