I just made a small library to reduce boilerplate when making a new Plug app:
I started rewriting a Sinatra app in Plug a while back and got a little frustrated by having to figure out a lot of boilerplate just to get a basic app running. So this is my way of maybe reducing that friction.
I’ve tried to keep it low on magic, and layered – you can have PlugAndPlay own the whole supervision tree, or provide your own with
PlugAndPlay.Supervisor as a child.
It might be convenient to have something like this built into Plug itself. But I suspect Plug wants to be mostly low-level and leave these concerns to other libraries.
Would love feedback and thoughts. Try it out the next time you set up a Plug app!