Geek7 commited on
Commit
0442bbb
·
verified ·
1 Parent(s): e10421a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -1,11 +1,14 @@
1
- # app.py
 
2
 
3
- import os
4
- import subprocess
5
 
6
- if __name__ == "__main__":
7
- # Run awake.py in the background
8
-
 
 
 
9
 
10
- # Run the Flask app using Gunicorn
11
- os.system("gunicorn -w 4 -b 0.0.0.0:8000 myapp:myapp") # 4 worker processes
 
1
+ from flask import Flask, render_template
2
+ from flask_cors import CORS # Import CORS
3
 
4
+ app = Flask(__name__)
 
5
 
6
+ # Enable CORS for the entire app
7
+ CORS(app)
8
+
9
+ @app.route('/')
10
+ def home():
11
+ return render_template('index.html')
12
 
13
+ if __name__ == "__main__":
14
+ app.run(debug=True)