Teil 19 Flask.
This commit is contained in:
		
							
								
								
									
										19
									
								
								teil19/firsthello/first.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								teil19/firsthello/first.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
from flask import Flask
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
app = Flask(__name__)
 | 
			
		||||
 | 
			
		||||
@app.route('/')
 | 
			
		||||
 | 
			
		||||
def index():
 | 
			
		||||
  return 'Ein erstes Hallo'
 | 
			
		||||
 | 
			
		||||
@app.route('/second')
 | 
			
		||||
 | 
			
		||||
def second():
 | 
			
		||||
  return '<b>Ein zweites Hallo</b>'
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
  app.run(host='0.0.0.0',port=8085, debug=True)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								teil19/firsthello/setenv.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								teil19/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