커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
4주차 잘못 된 것을 모르겠어요
undefined주차
북마크
김*리
댓글
4
추천
0
조회수
10
조회수
10
답변 완료
from flask import Flask
app = Flask(__name__)

@app.route('/')
def home():
   return '<button>나는 버튼이다</button>'



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


C:\Users\joon\Desktop\sparta\projects\prac\venv\Scripts\python.exe C:/Users/joon/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.35.215:5000

Press CTRL+C to quit

 * Restarting with stat

 * Debugger is active!

 * Debugger PIN: 868-389-945

127.0.0.1 - - [14/Aug/2022 17:41:54] "GET /mypage HTTP/1.1" 200 -

 * Detected change in 'C:\\Users\\joon\\Desktop\\sparta\\projects\\prac\\app.py', reloading

 * Restarting with stat

 * Debugger is active!

 * Debugger PIN: 868-389-945

 * Detected change in 'C:\\Users\\joon\\Desktop\\sparta\\projects\\prac\\app.py', reloading

 * Restarting with stat

 File "C:\Users\joon\Desktop\sparta\projects\prac\app.py", line 6

  return <button>'나는 버튼이다'</button>

      ^

SyntaxError: invalid syntax




localhost:5000하면 인터넷 끊긴것 처럼 나와요

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