Created
April 25, 2020 21:40
-
-
Save skytreader/7c4eee263724b904a92514a9f0d4c7a7 to your computer and use it in GitHub Desktop.
iden.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
""" | |
Usage: Install Flask, export this file as the `FLASK_APP` then `flask run`. | |
The resulting server will return the status code you as it for. Exemple gratis: | |
curl 127.0.0.1/404 - will return a 404 | |
curl 127.0.0.1/500 - will return a 500 | |
""" | |
@app.route("/<status>") | |
def index(status): | |
return "As you like it", int(status) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment