File size: 653 Bytes
64371be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
개발 ν™˜κ²½μ—μ„œ λΉ λ₯΄κ²Œ μ‹€ν–‰ν•  수 μžˆλŠ” 슀크립트
"""
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)