dracoox commited on
Commit
eabb8fd
·
verified ·
1 Parent(s): 3d3c684

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -10,14 +10,21 @@ def home():
10
  <head>
11
  <title>Flask on Tailscale</title>
12
  <style>
13
- body { font-family: Arial, sans-serif; text-align: center; margin-top: 100px; }
 
 
 
 
 
14
  h1 { color: #2c3e50; }
 
 
15
  </style>
16
  </head>
17
  <body>
18
  <h1>Hello from Flask over Tailscale!</h1>
19
- <p>You're accessing this app through a secure Tailscale connection.</p>
20
- <p>Try visiting <a href="/api/hello">/api/hello</a> or posting to <code>/api/echo</code>.</p>
21
  </body>
22
  </html>
23
  """)
@@ -37,4 +44,7 @@ def api_echo():
37
  return jsonify({
38
  "received": data,
39
  "status": "ok"
40
- })
 
 
 
 
10
  <head>
11
  <title>Flask on Tailscale</title>
12
  <style>
13
+ body {
14
+ font-family: Arial, sans-serif;
15
+ text-align: center;
16
+ margin-top: 100px;
17
+ background-color: #f8f9fa;
18
+ }
19
  h1 { color: #2c3e50; }
20
+ p { color: #555; }
21
+ a { color: #007bff; }
22
  </style>
23
  </head>
24
  <body>
25
  <h1>Hello from Flask over Tailscale!</h1>
26
+ <p>This is a secure Flask app behind a Tailscale network.</p>
27
+ <p>Try the <a href="/api/hello">JSON Hello</a> or POST to <code>/api/echo</code>.</p>
28
  </body>
29
  </html>
30
  """)
 
44
  return jsonify({
45
  "received": data,
46
  "status": "ok"
47
+ })
48
+
49
+ if __name__ == '__main__':
50
+ app.run(host='0.0.0.0', port=7860)