- NGINX Cookbook
- Tim Butler
- 88字
- 2021-07-03 00:04:30
Getting ready
This recipe is based on a very simple, single file Flask application. To show the simplicity, here's the example (demoapp.py) we'll use:
from flask import Flask application = Flask(__name__) @application.route("/") def hello(): return "<h1>Demo via Nginx with uWSGI!</h1>" if __name__ == "__main__": application.run(host='127.0.0.1', port=9001)
Like the Django recipe, we're going to use uWSGI for the application server in this scenario as well. If you haven't installed uWSGI yet, the best way is to install the latest version via pip:
apt-get install python-pip python-dev
pip install uwsgi
推薦閱讀
- Java加密與解密的藝術(shù)(第2版)
- Microsoft System Center Orchestrator 2012 R2 Essentials
- bbPress Complete
- Learning DHTMLX Suite UI
- Swift語(yǔ)言實(shí)戰(zhàn)精講
- Salesforce Reporting and Dashboards
- 編程可以很簡(jiǎn)單
- Unity Character Animation with Mecanim
- 平面設(shè)計(jì)經(jīng)典案例教程:CorelDRAW X6
- C++程序設(shè)計(jì)教程(第2版)
- Java EE Web應(yīng)用開(kāi)發(fā)基礎(chǔ)
- Mastering Leap Motion
- PHP Microservices
- Java程序設(shè)計(jì)入門(mén)(第2版)
- Vue.js 3.x高效前端開(kāi)發(fā)(視頻教學(xué)版)