@cryptotaxi247 / CoPilot / commits / 4afae0a5

Create copilot.py

taylor_socfortress committed Jul 10, 2023 at 16:50 UTC 4afae0a50d7c6588c441e28b1985d3c1d55e63a0
1 file changed +21
backend/copilot.py new
+21
@@ -0,0 +1,21 @@
1 +from flask import Flask
2 +from app import db
3 +from app import app
4 +
5 +from loguru import logger
6 +
7 +
8 +logger.add(
9 + "debug.log",
10 + format="{time} {level} {message}",
11 + level="INFO",
12 + rotation="10 MB",
13 + compression="zip",
14 +)
15 +logger.debug("Starting CoPilot...")
16 +
17 +with app.app_context():
18 + db.create_all()
19 +
20 +if __name__ == "__main__":
21 + app.run(debug=True)