

import ssl
from werkzeug.serving import run_simple
from daphne.cli import CommandLineInterface

# Your Django ASGI application
application = 'school.asgi:application'

# Create a dummy SSL context for local development
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
context.load_cert_chain('/etc/letsencrypt/live/pearlpackagingindia.com/fullchain.pem', '/etc/letsencrypt/live/pearlpackagingindia.com/privkey.pem')

# Run the Daphne server with SSL enabled
run_simple('0.0.0.0', 8000, CommandLineInterface(application), ssl_context=context)
