14 lines
301 B
Python
14 lines
301 B
Python
from waitress import serve
|
|
from main import app, DB_PATH, regen_html, out_path
|
|
from setup_db import migrate_0
|
|
import os
|
|
|
|
if not os.path.exists(DB_PATH):
|
|
migrate_0()
|
|
|
|
with app.app_context():
|
|
regen_html(out_path)
|
|
|
|
port = int(os.environ.get("PORT") or 3000)
|
|
serve(app, host='0.0.0.0', port=port)
|