-
-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·23 lines (16 loc) · 588 Bytes
/
run.py
File metadata and controls
executable file
·23 lines (16 loc) · 588 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3
import os
import pathlib
root_folder = pathlib.Path().absolute()
if not os.path.isdir(os.path.join(root_folder, "dashmachine", "user_data")):
os.mkdir(os.path.join(root_folder, "dashmachine", "user_data"))
db_file_path = os.path.join(root_folder, "dashmachine", "user_data", "site.db")
try:
os.remove(db_file_path)
except FileNotFoundError:
pass
from dashmachine import app
from dashmachine.main.utils import dashmachine_init
dashmachine_init()
if __name__ == "__main__":
app.run(debug=True, use_reloader=True, host="0.0.0.0", threaded=True)