Proxy Service
Make an Express proxy server that proxies to a Flask server.
We'll cover the following...
Setting up the proxy server
Since the development web server built into the Parcel bundler does not currently support acting as a proxy for another web service such as Flask on its own, we need to utilize a web server that can support that capability. The Express.js web framework for Node.js fits this requirement nicely and is very lightweight. Along with that, we will also utilize the http-proxy-middleware JavaScript library, which lets us cleanly integrate with the Parcel web server.
Most of the time, our back-end web server will have some kind of a RESTful API that accepts a request from a web client and responds by sending back JSON data. One assumption we will make is ...