The front end (main.js) now recieves data from the requests. This means
we can now push a PDF to the front end dynamically without the need for
refreshing a page.