File size: 388 Bytes
f299d29
 
 
 
 
 
 
 
8723817
 
 
 
f299d29
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from flask import Flask,redirect, abort

app = Flask(__name__)

@app.route("/")
def start():
    return "start"

@app.route("/config")
def config():
    return {}

@app.route("/200")
def hello_world():
    return "<p>Hello, World!</p>"

@app.route("/302")
def redir():
    return redirect("/200")

@app.route("/401")
def error_401():
    return abort(401, "Error 401")

app.run(port=7860)