Rise From the Ashes — Incremental APIs With Phoenix
Lauren Tan

Interesting! Thanks for writing the plug, seems really useful.

I’ve been doing something similar, although on infrastructure level, with a Nginx config. In short, I have Nginx working as reverse proxy. When the request hits Nginx, it first tries Phoenix app. If the response is one of the successful ones, it forwards it back to the client. However, if the response is 404, we forward to legacy API back-end. The key part of Nginx config in that case is:

error_page     404 = @legacy;

where “legacy” is name of upstream pointing to legacy API back-end.