Code from github to self hosted with git tea in AWS

This commit is contained in:
ADITYANAIR01
2026-03-20 12:01:02 +05:30
commit cf79af8f65
349 changed files with 4761 additions and 0 deletions

31
mini-dropbox/CODE/run.py Normal file
View File

@@ -0,0 +1,31 @@
# === FILE: run.py ===
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
from app import create_app
from app.db import init_db
# Create Flask app
app = create_app()
if __name__ == '__main__':
# Initialize database on first run
# try:
# init_db()
# except Exception as e:
# print(f"Database initialization warning: {e}")
# print("Make sure database is accessible and schema.sql exists")
print("Skipping database initialization - configure DB connection first")
# Run the application
# host 0.0.0.0 makes the app accessible externally
# port 5000 is the default Flask port
# debug should be False in production
app.run(
host='0.0.0.0',
port=5000,
debug=os.environ.get('FLASK_ENV') == 'development'
)