minecraft / app.py
rastof9's picture
Update app.py
c488141 verified
raw
history blame contribute delete
569 Bytes
from flask import Flask
# Create a Flask web application
app = Flask(__name__)
# This is the main page. It will respond to Hugging Face's health checks.
@app.route('/')
def health_check():
# You can customize this message
return "This page keeps the Minecraft server's Hugging Face Space alive. The server is running in the background!"
# This runs the web server.
if __name__ == '__main__':
# It listens on all network interfaces (0.0.0.0) and on port 7860,
# which is the default port for Hugging Face Spaces.
app.run(host='0.0.0.0', port=7860)