Firebase deploy sample "hello express"

Hi, I am having great difficulties getting the sample Hello express website to work with firebase hosting.
To get it to work I had to move the index.html file from views folder to public folder and then change line 22 in server.js to reflect the change.
Deploy again to firebase and now the index page is displayed but it is not fetching the dreams data from the server. The console is reporting the following:
Failed to load resource: the server responded with a status of 404 () /dreams:1

I think it is just a matter of file locations, but I am going round and round in circles trying to work it out.