Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 394 Bytes

File metadata and controls

29 lines (20 loc) · 394 Bytes

基础

from flask import Flask

app = Flask(__name__)


@app.route("/proxy")
def hello():
    return "Hello world!", 200
[wangx@localhost]$ flask --app hello run

request

  • method: "GET", "POST"
  • json: 把json数据解析出来

response

  • return "Hello world!", 200

部署

    gunicorn -w 4 -b 127.0.0.1:8000 --access-logfile log.log duishangproxy:app