fixed issues to let it run on server

This commit is contained in:
Computerboer
2024-10-14 00:42:46 +02:00
parent d295f18226
commit e066106585
3 changed files with 8 additions and 2 deletions

2
.gitignore vendored
View File

@@ -363,8 +363,8 @@ MigrationBackup/
# Fody - auto-generated XML schema # Fody - auto-generated XML schema
FodyWeavers.xsd FodyWeavers.xsd
/virtEnv_1 /virtEnv_1
/filecache
/env /env
/env_OLD /env_OLD
/myenv /myenv
*.tar.gz *.tar.gz
allauctions_NL.json

2
app.py
View File

@@ -7,7 +7,7 @@ from utils.auctionutils import getAuctionlocations
from models.location import JsonEncoder from models.location import JsonEncoder
app = Flask(__name__) app = Flask(__name__)
CORS(app, resources={r"/*": {"origins": ["http://localhost:4200","https://auctionviewer.ikbenhenk.nl", "https://victorious-bay-0d278c903.3.azurestaticapps.net"]}}) CORS(app, resources={r"/*": {"origins": ["http://localhost:4200","https://auctionviewer.ikbenhenk.nl"]}})
application = app # our hosting requires application in passenger_wsgi application = app # our hosting requires application in passenger_wsgi
@app.route("/") @app.route("/")

6
passenger_wsgi.py Normal file
View File

@@ -0,0 +1,6 @@
from app import app as application
import importlib.util
spec = importlib.util.spec_from_file_location("wsgi", "app.py")
wsgi = importlib.util.module_from_spec(spec)
spec.loader.exec_module(wsgi)