Rise From the Ashes — Incremental APIs With Phoenix
Lauren Elizabeth Tan
1863

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.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.