Geek7 commited on
Commit
cce730e
·
verified ·
1 Parent(s): 3644410

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ import os
4
+ import subprocess
5
+
6
+ if __name__ == "__main__":
7
+ # Run awake.py in the background
8
+ subprocess.Popen(["python", "wk.py"]) # Start awake.py
9
+
10
+ # Run the Flask app using Gunicorn
11
+ os.system("gunicorn -w 4 -b 0.0.0.0:5001 myapp:myapp") # 4 worker processes