3 ms·
app = App( components=[ DBComponent(), TodoManagerComponent(), ], routes=[ Include("/todos", [ Route("/", list_t
by JustSomeNobody 8y ago
app = App(
components=[
DBComponent(),
TodoManagerComponent(),
],
routes=[
Include("/todos", [
Route("/", list_todos),
Route("/", create_todo, method="POST"),
]),
],
)
Wonder what this would look like for a real app and not a toy.
- dternyak 8y agoHad the same thought, so I built https://github.com/dternyak/molten-boilerplate https://github.com/dternyak/molten-boilerplate Gets you pretty close to what a production app looks like. Feedback welcome!