mattermost로 메시지 보내기 세팅

This commit is contained in:
2025-07-22 14:39:20 +09:00
commit 343ecf3b46
10 changed files with 343 additions and 0 deletions

0
app/__init__.py Normal file
View File

36
app/app.py Normal file
View 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
)