jeongsoo's picture
init
64371be
raw
history blame contribute delete
653 Bytes
"""
개발 ν™˜κ²½μ—μ„œ λΉ λ₯΄κ²Œ μ‹€ν–‰ν•  수 μžˆλŠ” 슀크립트
"""
import os
import logging
import webbrowser
from app.app import app
# 둜거 μ„€μ •
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO
)
logger = logging.getLogger(__name__)
if __name__ == "__main__":
port = int(os.environ.get("PORT", 5000))
logger.info(f"μ„œλ²„λ₯Ό http://localhost:{port}μ—μ„œ μ‹œμž‘ν•©λ‹ˆλ‹€...")
# λΈŒλΌμš°μ € μžλ™ μ‹€ν–‰ (선택 사항)
webbrowser.open_new(f"http://localhost:{port}")
# ν”ŒλΌμŠ€ν¬ μ„œλ²„ μ‹€ν–‰
app.run(debug=True, host="0.0.0.0", port=port)