- 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
推薦閱讀
- Spring Cloud Alibaba核心技術與實戰案例
- Spring Cloud Alibaba微服務架構設計與開發實戰
- JavaScript 從入門到項目實踐(超值版)
- Vue.js 2 and Bootstrap 4 Web Development
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- Learning Data Mining with Python
- C# 從入門到項目實踐(超值版)
- PostgreSQL技術內幕:事務處理深度探索
- Web全棧工程師的自我修養
- CKA/CKAD應試教程:從Docker到Kubernetes完全攻略
- Bootstrap 4 Cookbook
- Kotlin Programming By Example
- 交互式程序設計(第2版)
- Java并發實現原理:JDK源碼剖析
- Python滲透測試編程技術:方法與實踐(第2版)