gunicorn 使用

#!/bin/bash
gunicorn --preload -w 4 -b 0.0.0.0:1235 wsgi:server --chdir /home/aaa/bbb > /home/bbb/vvv/log/start.log 2>&1 &

start.sh

 

wsgi.py

from server import server
from server.a_diff import a_diff
from server.b_web import b_web

# 接口注册在server上
server.register_blueprint(a_diff, url_prefix='/a_diff')
server.register_blueprint(b_web, url_prefix='/b_web')

 

执行sh start.sh即可

posted @ 2021-11-17 20:01  snailon  阅读(91)  评论(0编辑  收藏  举报