soiz commited on
Commit
a8f8c6a
·
verified ·
1 Parent(s): 1f3fe7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import os
2
  from flask import Flask, send_from_directory
3
 
4
- # リポジトリをクローン
5
- os.system("git clone https://github.com/ozh/cookieclicker.git .")
 
6
 
7
  app = Flask(__name__)
8
 
@@ -12,4 +13,4 @@ def index():
12
  return send_from_directory('.', 'index.html')
13
 
14
  if __name__ == '__main__':
15
- app.run(debug=True, port=7860)
 
1
  import os
2
  from flask import Flask, send_from_directory
3
 
4
+ # クローン先のディレクトリにすでに必要なファイルがあるかをチェック
5
+ if not os.path.exists('index.html'):
6
+ os.system("git clone https://github.com/ozh/cookieclicker.git .")
7
 
8
  app = Flask(__name__)
9
 
 
13
  return send_from_directory('.', 'index.html')
14
 
15
  if __name__ == '__main__':
16
+ app.run(debug=True)