def start_server(dev_mode=False): # prepare 'var' directory if os.path.exists(backend.BACKEND_VAR_DIR_PATH) is False: os.mkdir(backend.BACKEND_VAR_DIR_PATH) # initialize eel backend.init_web_root_path(dev_mode) web_root = backend.get_web_root_path() eel.init(web_root) try: create_config_json() _start(dev_mode) finally: _delete_config_json() _delete_tmp_files()
def get_index(): return btl.static_file('index.html', root=backend.get_web_root_path())