rdowin / app.py
hanafi43's picture
Upload 4 files
4d8da3d verified
raw
history blame contribute delete
533 Bytes
import os
import subprocess
from flask import Flask
app = Flask(__name__)
# Start Webtop
subprocess.Popen(
["/init"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL
)
@app.route("/")
def home():
return """
<html>
<head>
<meta http-equiv="refresh" content="0; url=/">
</head>
<body>
Desktop is starting...
</body>
</html>
"""
if __name__ == "__main__":
port = int(os.environ.get("PORT", 7860))
app.run(host="0.0.0.0", port=port)