1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| # -*- coding: utf8 -*-
import subprocess
from dozer import Dozer from flask import Flask
app = Flask(__name__)
@app.route("/") def home(): subprocess.call(["ls", "-l"]) return "hello world"
app = Dozer(app)
|
1
| $ gunicorn -b 0.0.0.0:5000 app:app
|
访问: http://localhost:5000/_dozer/index