Initial commit
This commit is contained in:
commit
6aa9bf85f3
10 changed files with 660 additions and 0 deletions
26
app/__init__.py
Normal file
26
app/__init__.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import os
|
||||
|
||||
from flask import Flask
|
||||
|
||||
from app.state import StreamState
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
app.state = StreamState(
|
||||
db_path=os.environ.get("STATE_DB_PATH", "/data/zoitestream.db"),
|
||||
history_limit=int(os.environ.get("HISTORY_LIMIT", "50")),
|
||||
)
|
||||
app.hook_token = os.environ.get("HOOK_TOKEN", "")
|
||||
app.domain = os.environ.get("DOMAIN", "stream.dumpnet.chat")
|
||||
app.rtmp_port = os.environ.get("RTMP_PORT", "1935")
|
||||
app.publish_user = os.environ.get("PUBLISH_USER", "streamer")
|
||||
app.publish_password = os.environ.get("PUBLISH_PASSWORD", "")
|
||||
app.creds_token = os.environ.get("CREDS_TOKEN", "")
|
||||
|
||||
from app.routes import bp
|
||||
|
||||
app.register_blueprint(bp)
|
||||
|
||||
return app
|
||||
Loading…
Add table
Add a link
Reference in a new issue