File size: 467 Bytes
5312808
 
 
a8f8c6a
 
 
5312808
 
 
 
 
 
 
 
 
46fdb99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)