first commit
This commit is contained in:
17
run.py
Normal file
17
run.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import threading
|
||||
from app import create_app
|
||||
from app.utils import start_smtp_server
|
||||
|
||||
app = create_app()
|
||||
|
||||
def run_smtp_server():
|
||||
start_smtp_server(host='0.0.0.0', port=25)
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 在单独的线程中启动 SMTP 服务器
|
||||
smtp_thread = threading.Thread(target=run_smtp_server)
|
||||
smtp_thread.daemon = True
|
||||
smtp_thread.start()
|
||||
|
||||
# 启动 Flask 应用
|
||||
app.run(host='0.0.0.0', port=5000, debug=True)
|
||||
Reference in New Issue
Block a user