config start

This commit is contained in:
michael-grace 2020-10-31 18:00:15 +00:00
parent 92d48993e7
commit 6044cbb271
3 changed files with 11 additions and 2 deletions

7
.gitignore vendored
View file

@ -1,5 +1,5 @@
.vscode/settings.json
__pycache__/ __pycache__/
@ -10,6 +10,7 @@ state/
build/build-exe-config.json build/build-exe-config.json
install/*.exe install/*.exe
install/nssm
*.pyo *.pyo
@ -20,3 +21,7 @@ build/build-exe-pyinstaller-command.bat
build/build/BAPSicle/ build/build/BAPSicle/
build/output/ build/output/
venv/
config.py

3
config.py.example Normal file
View file

@ -0,0 +1,3 @@
# Flask Details
HOST: str = "localhost"
PORT: int = 5000

View file

@ -4,6 +4,7 @@ from flask import Flask, render_template, send_from_directory, request
import json import json
import sounddevice as sd import sounddevice as sd
import setproctitle import setproctitle
import config
setproctitle.setproctitle("BAPSicle - Server") setproctitle.setproctitle("BAPSicle - Server")
@ -174,7 +175,7 @@ def startServer():
channel_p[channel].start() channel_p[channel].start()
# Don't use reloader, it causes Nested Processes! # Don't use reloader, it causes Nested Processes!
app.run(host='0.0.0.0', port=5000, debug=True, use_reloader=False) app.run(host=config.HOST, port=config.PORT, debug=True, use_reloader=False)
def stopServer(): def stopServer():