1. 10
    Setup an API Proxy in Create React App
    1m 32s

Setup an API Proxy in Create React App

InstructorAndy Van Slaars

Share this video with your friends

Send Tweet

For development, we'll be using a separate server address to reach our REST endpoints. In a production build, this will likely be a different address, and in many cases, our UI will be served from the same domain as our services. We can keep our code clean and still prepare for the differences between dev and prod, by using an API proxy and a relative path to our REST endpoints. In this lesson, we'll configure a proxy for create-react-app and refactor our code to use a relative API path.