This repository was archived by the owner on Jan 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathworking_test.py
More file actions
executable file
·58 lines (50 loc) · 1.89 KB
/
working_test.py
File metadata and controls
executable file
·58 lines (50 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
print("🔧 WORKING TEST - Using Port 8080")
print("=" * 40)
try:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def test():
return """
<html>
<head><title>WORKING!</title></head>
<body style="font-family: Arial; text-align: center; margin-top: 100px;">
<h1 style="color: green; font-size: 48px;">✅ WORKING!</h1>
<p style="font-size: 24px;">Flask is working on port 8080!</p>
<p style="font-size: 18px;">Port 5000 was blocked by ControlCenter</p>
<hr>
<h2>Next: Test Vue.js</h2>
<div id="vue-test">Loading Vue.js...</div>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
setTimeout(() => {
if (typeof Vue !== 'undefined') {
const { createApp } = Vue;
createApp({
data() { return { message: 'Vue.js works too!' } }
}).mount('#vue-test');
} else {
document.getElementById('vue-test').innerHTML = '❌ Vue.js failed to load';
}
}, 1000);
</script>
</body>
</html>
"""
print("✅ Flask app created")
print("")
print("🌐 STARTING ON PORT 8080...")
print("🌐 Go to: http://localhost:8080")
print("🌐 You should see a big green 'WORKING!'")
print("⏹️ Press Ctrl+C to stop")
print("")
# Kill the process blocking port 5000 first
import os
os.system("kill -9 77511 2>/dev/null")
print("🔪 Killed ControlCenter process on port 5000")
app.run(host='localhost', port=8080, debug=True)
except Exception as e:
print(f"❌ ERROR: {e}")
import traceback
traceback.print_exc()