It is generally deployed in the form of Flask+uWSGI+Nginx under Linux. It is really troublesome to deploy under win. I don’t know what your website is used for. If it is not a large-scale formal application, you can use tornado-server to deploy it. The specific method is very simple. In your flask project, the original entry program is assumed to be the tornado application tornado_server.py added to the same level directory of run.py. The content is as follows:
#coding=utf-8 from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from run import app http_server = HTTPServer(WSGIContainer(app)) http_server.listen(9000) #flask默认的端口 IOLoop.instance().start()
It is generally deployed in the form of Flask+uWSGI+Nginx under Linux. It is really troublesome to deploy under win. I don’t know what your website is used for. If it is not a large-scale formal application, you can use tornado-server to deploy it. The specific method is very simple. In your flask project, the original entry program is assumed to be the tornado application tornado_server.py added to the same level directory of run.py. The content is as follows:
1. Personally, you can deploy it as an apache service.
http://flask.pocoo.org/docs/0.11/deploying/
Official deployment method.