Files
mmkk/backend/app.py
guo liwei 9b3f959c3d Initial commit: Markdown editor with file management and regex tools
项目特性:
- 完整的Markdown编辑器,支持实时预览
- 文件管理功能,支持保存/加载/删除文件
- 正则表达式工具,支持批量文本替换
- 前后端分离架构
- 响应式设计

技术栈:
- 前端:React + TypeScript + Vite
- 后端:Python Flask
- Markdown解析:Python-Markdown

包含组件:
- WorkingMarkdownEditor: 基础功能版本
- FullMarkdownEditor: 完整功能版本
- SimpleMarkdownEditor: 简化版本
2025-08-03 06:21:02 +08:00

25 lines
549 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
"""
Flask应用入口文件
启动Markdown编辑器的后端服务
"""
import os
import sys
from app import create_app
def main():
"""主函数启动Flask应用"""
app = create_app()
# 获取端口配置
port = int(os.environ.get('PORT', 5000))
debug = os.environ.get('DEBUG', 'False').lower() == 'true'
print(f"Starting Markdown Editor API on port {port}")
print(f"Debug mode: {debug}")
app.run(host='0.0.0.0', port=port, debug=debug)
if __name__ == '__main__':
main()