TechDev commited on
Commit
4903704
·
verified ·
1 Parent(s): 0c20b62

Upload 5 files

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,12 +1,14 @@
1
  import os
2
  from flask import Flask, send_file
3
  from flask_socketio import SocketIO
4
- import threading
5
 
6
  app = Flask(__name__)
7
  socketio = SocketIO(app, async_mode='eventlet')
8
  base_dir = os.path.abspath('files')
9
 
 
 
10
  @socketio.on('request_dir_structure')
11
  def send_dir_structure():
12
  structure = {}
@@ -38,4 +40,4 @@ def send_file_chunk(data):
38
  socketio.sleep(0.01) # Evita bloquear el hilo del servidor
39
 
40
  if __name__ == '__main__':
41
- socketio.run(app, port=5000)
 
1
  import os
2
  from flask import Flask, send_file
3
  from flask_socketio import SocketIO
4
+ import threading, subprocess
5
 
6
  app = Flask(__name__)
7
  socketio = SocketIO(app, async_mode='eventlet')
8
  base_dir = os.path.abspath('files')
9
 
10
+ subprocess.Popen(["venv/bin/python", "main.py"])
11
+
12
  @socketio.on('request_dir_structure')
13
  def send_dir_structure():
14
  structure = {}
 
40
  socketio.sleep(0.01) # Evita bloquear el hilo del servidor
41
 
42
  if __name__ == '__main__':
43
+ socketio.run(app, port=7860)