
app.py 터미널에서 파이썬파일 실행 누르면 오류가 뜨는데 어떤게 잘못된건지 모르겠습니다...
<오류메세지>
(venv) Marsh-melloui-MacBookPro:03.pedia marshmello$ /Users/marshmello/Desktop/sub_marsh/projects/03.pedia/venv/bin/python /Users/marshmello/Desktop/sub_marsh/projects/03.pediaapp.py
/Users/marshmello/Desktop/sub_marsh/projects/03.pedia/venv/bin/python: can't open file '/Users/marshmello/Desktop/sub_marsh/projects/03.pediaapp.py': [Errno 2] No such file or directory
(venv) Marsh-melloui-MacBookPro:03.pedia marshmello$
<app.py>
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route("/movie", methods=["POST"])
def movie_post():
sample_receive = request.form['sample_give']
print(sample_receive)
return jsonify({'msg':'POST 연결 완료!'})
@app.route("/movie", methods=["GET"])
def movie_get():
return jsonify({'msg':'GET 연결 완료!'})
if __name__ == '__main__':
app.run('0.0.0.0', port=5001, debug=True)
