Created
January 15, 2021 07:46
-
-
Save I-himawari/d28fff2e687250ef916edbb7e41058ac to your computer and use it in GitHub Desktop.
flask port 80
This file contains hidden or 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, request | |
| app = Flask(__name__) | |
| @app.route('/', methods=["GET", "POST"]) | |
| def hello(): | |
| print(request.headers) | |
| print(request.get_data()) | |
| name = "Hello World" | |
| return name | |
| @app.route('/good') | |
| def good(): | |
| name = "Good" | |
| return name | |
| if __name__ == "__main__": | |
| app.run(debug=True, host='0.0.0.0', port=80) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment