We should probably remove idom.run() #654
Archmonger
started this conversation in
Ideas
Replies: 1 comment
-
Good point. Sanic (the default) runs with a production server but the others don't. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Or at the very least, move it into a subfolder that makes it clear that it is a development utility. It shouldn't be the primary advertised way of using IDOM.
Using a development webserver for production use is a big no-no, and by prominently displaying
idom.run()
as the first steps to using IDOM shows we are encouraging people to do just that. I believe the primary way of utilizing IDOM should be embedding within existing applications (see #653).If we really want a
run()
callable to exist as a shortcut for running a simple single component application, we can consider is bundling a cross-platform ASGI webserver within this project and haveidom.run()
utilize that instead of running a development webserver. Hypercorn and Daphne are the only ASGI webserver I've tested be fully cross platform with no issues.But even in this scenario I would still recommend changing the callable path to something like
idom.shortcuts.run()
.Beta Was this translation helpful? Give feedback.
All reactions