######################################################################
# 
# This file is auto-generated by Slush.
# Purpose:
#   - To run the Slush server.
#   - It shows how to set up the server with auto-reloading.
#   - It provides an example of how to run the server using `slush.server.run
#     which is the recommended way.
#   - It also includes an older way of running a Slush server using WSGI.
#
# 
# ❌ Why not use this?
#    - It’s outdated and lacks modern features.
#
# ✅ Recommended way:
#    - Use `slush.server.run` instead.
#    - This provides better features like auto-reloading, easier setup,
#      and more developer-friendly defaults.
#
# Example:
#    from main import app
#    from slush.server import run
#
#    run(app, port=8000, debug=True)
#
######################################################################

"""
Older version of how to run Slush server using WSGI.
This is not the recommended way anymore.
Use `slush.server.run` instead for better features like auto-reloading.
"""

# from wsgiref.simple_server import make_server
# from example_app import app
#
# server = make_server('localhost', 8000, app)
# print(f"Serving on http://localhost:8000...")
# server.serve_forever()

from main import app
from slush.server import run

run(app, port=8000)  # auto-reload
