DEV Community

Discussion on: How to develop a UI and an API at the same time, with no headaches

Collapse
 
tbroyer profile image
Thomas Broyer

You can have the bundler dev server proxy to the API server, but I agree using watch mode is the way to go; if only to get the server intercept requests to the HTML page and handle authentication through redirections (to an SSO or simply a login form).

This is the way to go… unless your building a PWA in which case the dev server approach reverse-proxying to the API should work just OK too (at one point, you'll necessarily have your HTML loaded from your service worker and your authentication with the server will have expired one way or another)