fix api variable access
@@ -9,7 +9,6 @@ from .routes import routes
from .routes import version
-def main():
cors = CORS(allow_all_origins=True)
api = application = falcon.App(middleware=[cors.middleware])
@@ -17,6 +16,9 @@ def main():
for route in r:
api.add_route(version()+route, r[route])
+
+def main():
+
parser = argparse.ArgumentParser()
parser.add_argument(
'--port', '-p', help='Port to run the API webserver on', type=int, default=8000)
