|
import os |
|
from flask import Flask, send_from_directory |
|
|
|
|
|
def clone_repo(): |
|
|
|
clone_flag = "repo_cloned.flag" |
|
|
|
if not os.path.exists(clone_flag): |
|
print("Cloning the repository...") |
|
os.system("git clone https://github.com/ozh/cookieclicker.git .") |
|
|
|
|
|
with open(clone_flag, 'w') as f: |
|
f.write("Repository has been cloned.") |
|
else: |
|
print("Repository already cloned.") |
|
|
|
|
|
clone_repo() |
|
|
|
|
|
app = Flask(__name__) |
|
|
|
|
|
@app.route('/') |
|
def index(): |
|
return send_from_directory('.', 'index.html') |
|
|
|
if __name__ == '__main__': |
|
|
|
app.run(host='0.0.0.0', port=7860) |
|
|