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