script de inicio para pruebas
parent
da655183c4
commit
fe423b0bc6
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
#HOST='0.0.0.0' # Permite la conexión remota
|
||||
HOST='127.0.0.1' #Permite solo conexiones locales
|
||||
|
||||
#PORT='6000' # Por defecto elige un puerto al azar.
|
||||
|
||||
python3 web-interface/debug.py $HOST $PORT
|
|
@ -1,4 +1,17 @@
|
|||
import sys
|
||||
from basicweb import app
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host= '0.0.0.0')
|
||||
if len(sys.argv) == 3:
|
||||
host = sys.argv[1]
|
||||
port = sys.argv[2]
|
||||
elif len(sys.argv) == 2:
|
||||
import random
|
||||
host = sys.argv[1]
|
||||
port = random.randrange(3000,9000,1)
|
||||
else:
|
||||
import random
|
||||
host = '127.0.0.1'
|
||||
port = random.randrange(3000,9000,1)
|
||||
|
||||
app.run(host=host, port=port)
|
||||
|
|
Loading…
Reference in New Issue