cookie2 / app.py
soiz's picture
Update app.py
46fdb99 verified
raw
history blame
467 Bytes
import os
from flask import Flask, send_from_directory
# クローン先のディレクトリにすでに必要なファイルがあるかをチェック
if not os.path.exists('index.html'):
os.system("git clone https://github.com/ozh/cookieclicker.git .")
app = Flask(__name__)
# index.htmlをルートパスで表示
@app.route('/')
def index():
return send_from_directory('.', 'index.html')
if __name__ == '__main__':
app.run(debug=True, port=7860)