flask neu in develop
This commit is contained in:
14
flask/firsthello/first.py
Normal file
14
flask/firsthello/first.py
Normal 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
16
flask/firsthello/run.py
Normal 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
4
flask/firsthello/setenv.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
export FLASK_APP=first
|
||||
export FLASK_ENV=development
|
||||
|
Reference in New Issue
Block a user