Task code
Task code is the soul for each Shypard task. When a task is triggered, the javascript code for the task will be executed.

What are the format of task code?

The default task code is a single index.js file as follows. The index.js is the entry point for each task, and need to export an async handler function.
1
const { auths, libs } = require('platform');
2
​
3
module.exports = async (event, options) => {
4
console.log("Hello world");
5
};
Copied!
The exported function is used to handle the task execution. It contains 2 parameters
    1.
    event: The event object which is based on the trigger type
    2.
    options: task option object​

What is the platform library?

Great question! platform is the javascript SDK library available within Shypyard execution environment. It offers utility function to interact with the integrated services and also platform services like Shypyard database, file storage and email.
​
Last modified 6mo ago