config = toml.load(args.config) return config config = process_args() app = flask.Flask(__name__) CORS(app) flog.default_handler.setFormatter(logging.Formatter(config['log_format'])) logging.basicConfig(filename=config['log_file'], format=config['log_format'], level=logging.DEBUG) print(f'Flask logger is redirected to {config["log_file"]}') pm = ProcessManager() pm.add_job('motor', spin_motors) pm.add_job('servo', move_servo) @app.route('/api/v1/healthcheck', methods=['GET']) def healthcheck(): return 'ok', 200 @app.route('/api/v1/wifistrength', methods=['GET']) def wifi_strength(): return check_wifi(), 200 @app.route('/api/v1/motor', methods=['POST']) def control_motors():