Write file from server returns success, but can not find file [SOLVED]


#1

I am trying to do a simple fs.writeFile on this server in meteor. It returns a success message for the majority of solutions I have tried. But I cannot find the file anywhere in the file structure. Ideas?
Here is a simple snippet I have tried.

const fs = require('fs');

var path = process.env['METEOR_SHELL_DIR'] + '/../../../public';

fs.writeFile('helloworld.txt', 'Hello World!', function (err) {
    if (err) {
        console.log("Error:" + err);
    } else {
        console.log("Success");
    }
});

#2

I forgot to pass the path variable to the writeFile method.