jungil's picture
Update app.py
1084245
raw
history blame contribute delete
604 Bytes
from flask import Flask
app = Flask(__name__)
# μ›Ή μ„œλΉ„μŠ€μ˜ 루트 URL에 접속할 λ•Œμ˜ λ™μž‘μ„ μ •μ˜ν•©λ‹ˆλ‹€.
@app.route('/')
def index():
return 'μ•ˆλ…•ν•˜μ„Έμš”! 이것은 κ°„λ‹¨ν•œ μ›Ή μ„œλΉ„μŠ€μž…λ‹ˆλ‹€.'
# λ‹€λ₯Έ κ²½λ‘œμ— 접속할 λ•Œμ˜ λ™μž‘μ„ μ •μ˜ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.
@app.route('/hello')
def hello():
return 'μ•ˆλ…•ν•˜μ„Έμš”! Flaskλ₯Ό μ΄μš©ν•œ μ›Ή μ„œλΉ„μŠ€μ— μ˜€μ‹  것을 ν™˜μ˜ν•©λ‹ˆλ‹€.'
if __name__ == '__main__':
# μ„œλ²„λ₯Ό μ‹€ν–‰ν•©λ‹ˆλ‹€. 디버그 λͺ¨λ“œλ₯Ό ν™œμ„±ν™”ν•˜λ©΄ μ½”λ“œ 변경이 μžλ™μœΌλ‘œ λ°˜μ˜λ©λ‹ˆλ‹€.
app.run(debug=True)