wip
This commit is contained in:
parent
af4b75acb4
commit
3036042416
6 changed files with 30 additions and 82 deletions
18
wsgi.py
18
wsgi.py
|
@ -1,13 +1,17 @@
|
|||
import os
|
||||
import secrets
|
||||
from app import create_app
|
||||
|
||||
# Set the environment variable for database URL if needed
|
||||
# os.environ['DATABASE_URL'] = 'your_production_database_url'
|
||||
# Get Flask environment
|
||||
flask_env = os.environ.get("FLASK_ENV", "production")
|
||||
|
||||
# Create a production application
|
||||
app = create_app("production")
|
||||
# Create the application
|
||||
app = create_app(flask_env)
|
||||
|
||||
# Also provide 'application' for WSGI servers that look for this name
|
||||
application = app
|
||||
|
||||
if __name__ == "__main__":
|
||||
# This is only used for development
|
||||
# In production, a WSGI server would import this file
|
||||
app.run(host="0.0.0.0", port=5000)
|
||||
# Only for development
|
||||
debug = flask_env != "production"
|
||||
app.run(host="0.0.0.0", port=8000, debug=debug)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue