localhost:5000은 접속이 되는데
localhost:5000/mypage 는 Not found로 뜹니다 ㅠ
코드
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return 'This is Home!'
if __name__ == '__main__':
app.run('0.0.0.0',port=5000,debug=True)
@app.route('/mypage')
def mypage():
return 'This is Mypage!!!'
결과 값
C:\Users\user\Desktop\sparta\projects\prac\venv\Scripts\python.exe C:/Users/user/Desktop/sparta/projects/prac/app.py
* Serving Flask app 'app'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.0.102:5000
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: 487-218-095
127.0.0.1 - - [15/Aug/2022 09:19:18] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [15/Aug/2022 09:19:24] "GET /mypage HTTP/1.1" 404 -