flask neu in develop

This commit is contained in:
2023-06-08 19:26:49 +02:00
parent 9e78b44184
commit dd7d747a99
14 changed files with 1063 additions and 0 deletions

14
flask/firsthello/first.py Normal file
View File

@@ -0,0 +1,14 @@
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Ein erstes Hallo'
if __name__ == '__main__':
app.run(host='0.0.0.0',port=8085, debug=True)

16
flask/firsthello/run.py Normal file
View File

@@ -0,0 +1,16 @@
#! /usr/bin/python3
#encoding: utf-8
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@app.route('/test')
def test():
return 'Hello Test'
app.run(host='0.0.0.0',port=8082)

4
flask/firsthello/setenv.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/bash
export FLASK_APP=first
export FLASK_ENV=development