* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
App.py 를 코드스니펫에서 복사해서 실행하였는데 localhost:5001 페이지가 아예 뜨질 않네요. 하얀색 페이지로 나옵니다.
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route("/bucket", methods=["POST"])
def bucket_post():
sample_receive = request.form['sample_give']
print(sample_receive)
return jsonify({'msg': 'POST 연결 완료!'})
@app.route("/bucket", methods=["GET"])
def bucket_get():
return jsonify({'msg': 'GET 연결 완료!'})
if __name__ == '__main__':
app.run('0.0.0.0', port=5001, debug=True)
(venv) Jeong-Dae@mannix 04.bucket % "/Users/Jeong-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/venv/bin/python" "/Users/Jeong
-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/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:5001
* Running on http://10.0.0.93:5001
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: 127-665-475
127.0.0.1 - - [12/Jun/2023 20:30:43] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [12/Jun/2023 20:30:43] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [12/Jun/2023 20:30:57] "GET / HTTP/1.1" 200 -
* Detected change in '/Users/Jeong-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/app.py', reloading
* Restarting with stat
* Debugger is active!
* Debugger PIN: 127-665-475
"/Users/Jeong-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/venv/bin/python" "/Users/Jeong-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/app.py"
127.0.0.1 - - [12/Jun/2023 20:31:50] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [12/Jun/2023 20:32:03] "GET / HTTP/1.1" 200 -
"/Users/Jeong-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/venv/bin/python" "/Users/Jeong-Dae/Documents/Coding Club/Sparta/Projects/04.bucket/app.py"
127.0.0.1 - - [12/Jun/2023 20:37:22] "GET / HTTP/1.1" 200 -