muizenval

Observe mouse traps remotely
Log | Files | Refs

run-server.py (265B)


      1 import sys
      2 
      3 from server.app import socket, app
      4 
      5 if len(sys.argv) > 1:
      6     if not sys.argv[1].isnumeric():
      7         print(f'Usage: {sys.argv[0]} [port=80]')
      8         exit(1)
      9     port = int(sys.argv[1])
     10 else:
     11     port = 80
     12 
     13 socket.run(app, "0.0.0.0", port, debug=True)