Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Proxy Requests for Local and Remote Service Parity

    expressExpress
    ^4.16.2

    High availability apps require that no distinction be made between local and remote services. Attached resources should be accessed by environment variables, and in doing so allow you to swap out one attached resource for another.

    In this lesson we will setup a reverse proxy that directs image path requests and routes them through a defined server URL. By doing so, we decouple server requests for images which allows for easy switching from locally-served image assets to a CDN by simply updating an environment variable.