커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
스스로 해결
화성땅 공동구매 부분을 하고 있습니다. 그런데 아예 켜지질 않습니다
undefined주차
북마크
이*담
댓글
3
추천
0
조회수
14
조회수
14
스스로 해결


화성땅 공동구매를 하며 app.py를 만들고 index를 만들고 실행을 시켜보고 localhost5000을 써도 그전에 했던 웹페이지가 나옵니다




스파르타 즉문즉답




from flask import Flask, render_template, request, jsonify
app = Flask(__name__)

@app.route('/')
def home():
return render_template('index.html')

@app.route("/mars", methods=["POST"])
def web_mars_post():
sample_receive = request.form['sample_give']
print(sample_receive)
return jsonify({'msg': 'POST 연결 완료!'})

@app.route("/mars", methods=["GET"])
def web_mars_get():
return jsonify({'msg': 'GET 연결 완료!'})

if __name__ == '__main__':
app.run('0.0.0.0', port=4000, debug=True)



취소
 공유
취소
댓글 0
댓글 알림
나의얼굴