mattermost로 메시지 보내기 세팅
This commit is contained in:
0
app/__init__.py
Normal file
0
app/__init__.py
Normal file
36
app/app.py
Normal file
36
app/app.py
Normal file
@ -0,0 +1,36 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# 📌 프로젝트 루트 경로 추가
|
||||
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from views import webhook_bp # views.py에 정의된 Blueprint 객체
|
||||
from lib.config import Config
|
||||
|
||||
import logging
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
# 로그 레벨 설정
|
||||
logging.basicConfig(
|
||||
level=Config.LOG_LEVEL,
|
||||
format="%(asctime)s [%(levelname)s] %(message)s"
|
||||
)
|
||||
|
||||
# 웹훅 라우트 등록
|
||||
app.register_blueprint(webhook_bp)
|
||||
|
||||
return app
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Config.validate()
|
||||
app = create_app()
|
||||
app.run(
|
||||
host=Config.WEBHOOK_SERVER_HOST,
|
||||
port=Config.WEBHOOK_SERVER_PORT,
|
||||
debug=Config.DEBUG
|
||||
)
|
||||
Reference in New Issue
Block a user