I'm trying to create a cloud function which includes certificate file in nodejs. Below is the code which I'm trying to execute:
exports.invoke = async function(req, res) {
const walletPath = path.join(process.cwd(), './wallet');
const wallet = new FileSystemWallet(walletPath);
console.log(`Wallet path: ${walletPath}`);
// Check to see if we've already enrolled the user.
const userExists = await wallet.exists('user1');
console.log(userExists);
if (!userExists) {
console.log('An identity for the user "user1" does not exist in the wallet');
console.log('Run the registerUser.js application before retrying');
return;
}
}
Cloud function not able to read the certificate which is in the wallet folder.
Thanks in advance.