final stage of the app
This commit is contained in:
33
main.py
Normal file
33
main.py
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
QR Code Manager - Main Application Entry Point
|
||||
|
||||
A modern Flask web application for generating and managing QR codes with authentication.
|
||||
Features include:
|
||||
- Multiple QR code types (text, URL, WiFi, email, SMS, vCard)
|
||||
- Dynamic link pages for managing collections of links
|
||||
- Admin authentication with bcrypt password hashing
|
||||
- Docker deployment ready
|
||||
- Modern responsive web interface
|
||||
"""
|
||||
|
||||
import os
|
||||
from app import create_app
|
||||
|
||||
# Create Flask application
|
||||
app = create_app()
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Production vs Development configuration
|
||||
is_production = os.environ.get('FLASK_ENV') == 'production'
|
||||
|
||||
if is_production:
|
||||
print("🚀 Starting QR Code Manager in PRODUCTION mode")
|
||||
print("🔐 Admin user: admin")
|
||||
print("🔒 Make sure to change default credentials!")
|
||||
app.run(host='0.0.0.0', port=5000, debug=False)
|
||||
else:
|
||||
print("🛠️ Starting QR Code Manager in DEVELOPMENT mode")
|
||||
print("🔐 Admin user: admin")
|
||||
print("🔑 Default password: admin123")
|
||||
app.run(host='0.0.0.0', port=5000, debug=True)
|
||||
Reference in New Issue
Block a user