diff --git a/README.md b/README.md index 96a70d7..1dbcb5d 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,3 @@ WebEngineering2 Projekt: Aktien und News Bot für Telegram ## Dokumentation - Postman-API -> docs/postman.json - Datenbank -> database/* - -## Local setup for telegram bot -0. optional: build virtual env by ``python -m venv venv`` - ``env/Scripts/activate`` -2. create .env and set API keys etc. (use .env.example as a layout) -3. install required libs via ``pip install -r ./telegram_bot/requirements.txt`` -4. run bot.py via ``python ./telegram_bot/bot.py`` diff --git a/api/app.py b/api/app.py index 88049f6..1c6d2e2 100644 --- a/api/app.py +++ b/api/app.py @@ -18,7 +18,11 @@ def create_app(): application = APIFlask(__name__, docs_path='/api/docs') application.config.from_object("config.ConfigClass") - CORS(application) + CORS(application, resource={ + r"/*": { + "origins": "*" + } + }) application.app_context().push() diff --git a/api/config.py b/api/config.py index e7f323c..0bff4a9 100644 --- a/api/config.py +++ b/api/config.py @@ -23,7 +23,7 @@ class ConfigClass(object): SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning # openapi/Swagger config - SPEC_FORMAT = 'yaml' + LOCAL_SPEC_PATH = 'docs/openapi.json' SERVERS = [ { "name": "Production", diff --git a/telegram_bot/README.md b/telegram_bot/README.md new file mode 100644 index 0000000..abda9e2 --- /dev/null +++ b/telegram_bot/README.md @@ -0,0 +1,6 @@ +## Local setup for telegram bot +0. optional: build virtual env by ``python -m venv venv`` + ``env/Scripts/activate`` +2. create .env and set API keys etc. (use .env.example as a layout) +3. install required libs via ``pip install -r ./telegram_bot/requirements.txt`` +4. run bot.py via ``python ./telegram_bot/bot.py``