I found a solution which I’ll document for posterity.
My intention was to have the user download the html file in a zip. What I did is, instead of writing to a file, I wrote the html to a variable and then ‘appended’ that into a zip file using Node archiver (https://github.com/archiverjs/node-archiver).
I have a static image that is included in every zip file along with the html file. The image is permanently located on the server in the public folder. But fs.createReadStream would always return an error when I tried to read it. This wasn’t a problem on the dev server.
The problem was how meteor production, or at least galaxy, changes the ‘public’ folder path. Following this method -> How to list images inside public/? - I was able to find the right path to the ‘public’ folder. The following works on both production and development environments.
var meteorRoot = fs.realpathSync( process.cwd() + ‘/…/’ );
var publicPath = meteorRoot + ‘/web.browser/app/’;
It looks like I can write to ‘public’ on galaxy. I just couldn’t read from it because its path is in a different place than on the dev server.