3 ms·
>My huge beef with plug is that it creates an implicit conn variable in all of the plug bodies. What do you mean? That only happens if you use Plug.Router; oth
by dqv 3y ago
>My huge beef with plug is that it creates an implicit conn variable in all of the plug bodies.
What do you mean? That only happens if you use Plug.Router; otherwise, you have to define a call function that takes the conn as the first argument. You can even go as far as explicitly calling the init functions for each Plug manually. It's init(opts), call(conn, opts) all the way down.
- throwawaymaths 3y agoyes sorry, I meant Plug.Router macro bodies. The rest of plug is fine.