4 ms·
it takes like 6 lines of code to have a working flask endpoint to deploy a quick and dirty API. About a billion files for phoenix. I hate that too.
by fud101 4y ago
it takes like 6 lines of code to have a working flask endpoint to deploy a quick and dirty API. About a billion files for phoenix. I hate that too.
- Existenceblinks 4y agoI understand that generator is for education purpose. New comers might find it's cumbersome to get start if generators are absent. However, I think it should be just some guide docs. Generated context can mislead the concept of how to use the context itself. It's easy to quickly write a dirty API in phoenix, but practice guides lead to ceremony.
- dugmartin 4y agoTo be fair you could use Plug and Plug.Router directly and get almost the same line count as a flask app. https://hexdocs.pm/plug/Plug.Router.html https://hexdocs.pm/plug/Plug.Router.html
- josevalim 4y agoPhoenix by definition assumes your projects will take longer than an afternoon. :) If you want a quick and dirty API, using Plug directly may be an option: https://gist.github.com/josevalim/fbfc669aa6087c5b79402b399d70349a https://gist.github.com/josevalim/fbfc669aa6087c5b79402b399d...
- dugmartin 4y agoYou beat me to the submit button by a minute.
- fud101 4y agoIt comes down to whether you want to maintain a bunch of auto generated files which will never be automatically updated. I would rather maintain only the lines of code I write not ones that were generated by some tool and then immediately became legacy.