I have written a function which reads a file. It’s a simple small text file, and when debugging it works fine. After deploying, it is not found, though in Cloud Code (Coding) tab it seems to be uploaded and in a correct structure. Am I doing some wrong here?
const privateKey = fs.readFileSync(
"certs/AuthKey_xyz.p8",
"utf8"
);
File tree in my computer:
File tree after deploying to BL:
Getting this error when invoking the function (tried both with ../
and without it):
Any idea how to make it work?
Thanks,
Justinas