Hi,
I have added the triggers for install and upgrade in my manifest.yml. and created a function to fetch the events. But how to test this in local.
I ran my app using npm run dev . Meanwhile in another console i did forge install --upgrade. But i dont see any messages in console.
Could someone please help in testing these events.
manifest.yml:
trigger:
- key: lifecycle-trigger
function: lifecycle-trigger-func
events:
- avi:forge:installed:app
- avi:forge:upgraded:app
function:
- key: resolver
handler: index.handler
- key: lifecycle-trigger-func
handler: lifecycle.postInstallOrUpdateHandler
lifecycle.js:
exports.postInstallOrUpdateHandler = async function(event, context) {
console.log('event: ' + JSON.stringify(event));
console.log('context: ' + JSON.stringify(context));
return true;
};
Thanks