Skip to content

Commit

Permalink
Upgraded programming model to V2
Browse files Browse the repository at this point in the history
  • Loading branch information
hvalfangst committed Jan 4, 2024
1 parent 2f615b4 commit 759b57a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: pip install -r requirements.txt

- name: Zip artifact for deployment
run: zip -r release.zip host.json requirements.txt wsgi_middleware/* flask_api/*
run: zip -r release.zip host.json requirements.txt function_app.py crypto_utils/*

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
Expand Down
File renamed without changes.
Empty file removed flask_api/crypto_utils/__init__.py
Empty file.
10 changes: 5 additions & 5 deletions flask_api/__init__.py → function_app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from flask import Flask, jsonify, request
import logging

from flask_api.crypto_utils.module import aes_encrypt, aes_decrypt
import azure.functions as func
from flask import Flask, jsonify, request

from crypto_utils import aes_encrypt, aes_decrypt

app = Flask(__name__)

Expand Down Expand Up @@ -87,6 +89,4 @@ def decrypt():
return jsonify(response)


if __name__ == "__main__":
# Run the application with the built-in development server
app.run()
app = func.WsgiFunctionApp(app=app.wsgi_app, http_auth_level=func.AuthLevel.ANONYMOUS)
8 changes: 0 additions & 8 deletions wsgi_middleware/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions wsgi_middleware/function.json

This file was deleted.

0 comments on commit 759b57a

Please sign in to comment.