litestar-org / litestar

Production-ready, Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs
https://litestar.dev/
MIT License
5.66k stars 384 forks source link

Documentation: Maybe the description concerning the file containing the instance of Starlite and the CLI not consistent #1221

Closed konsilanto closed 1 year ago

konsilanto commented 1 year ago

Application object mentions that the instance of Starlite is typically placed inside a file called main.py. The CLI Autodiscovery is only searching for app.py, application.py, asgi.py, and app/__init__.py. Maybe CLI or the documentation could be changed to be more clearer/consistent.

provinzkraut commented 1 year ago

I think we just need to reword the section about the application object. Placing that in a main.py file is not really a convention we promote anywhere else, and as such is not honored by the CLI as well.

Nevertheless, I intended to extend the autodiscovery's "best match" functionality in such a way that it would pick up an app in a file of any name within the current working directory, should it not find an app in one of the canonical paths.

I'll open an issue to track this.

konsilanto commented 1 year ago

Ok, thanks! Then we could close this particular issue.