SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e84710bb826ed22e20789dd1144ce42b3cd0c672
parent 6be787c2ef2dbda944262bcd841749892af0f7ac
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Sun, 27 Dec 2020 12:48:04 +1100

move websocket code back before decorator functions

Diffstat:
Mserver.py | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/server.py b/server.py @@ -8,6 +8,12 @@ import config import invoice from pay import bitcoind +# Begin websocket +async_mode = None +app = Flask(__name__) +app.config['SECRET_KEY'] = 'secret!' +socket_ = SocketIO(app, async_mode=async_mode) + # Render html @app.route('/') def index(): @@ -124,13 +130,6 @@ def process_payment(payment): return - -# Begin websocket -async_mode = None -app = Flask(__name__) -app.config['SECRET_KEY'] = 'secret!' -socket_ = SocketIO(app, async_mode=async_mode) - # Test Bitcoind connection on startup: print("Checking node connectivity...") bitcoind.btcd('1', 'USD', 'Init test.')