2019-02-25 10:59:09 +01:00
|
|
|
import os
|
2019-02-12 16:59:43 +01:00
|
|
|
import json
|
2019-02-25 10:59:09 +01:00
|
|
|
import shutil
|
2019-02-12 16:59:43 +01:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Global variables that is None by default and gets overwritten in other modules
|
|
|
|
|
|
|
|
app = None # main.py -> Flask App
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Global variables that initializes on first load of module
|
|
|
|
|
2019-02-25 10:59:09 +01:00
|
|
|
if not os.path.isfile("config.json"):
|
|
|
|
print("`config.json` were not found! Copying default_config and continuing...")
|
|
|
|
shutil.copy("default_config.json", "config.json")
|
|
|
|
|
2019-02-12 16:59:43 +01:00
|
|
|
with open("config.json", "r") as f:
|
|
|
|
config = json.load(f)
|