AegisBlade Node.js Client
The node.js client library for AegisBlade.
Read the docs »
Examples
·
Sign Up for an API Key
·
Report Bug
Installation
Install the npm package as a dependency of your application.
npm install --save aegisblade
Hello World Example
const aegisblade = ;const os = ; /** * In this example the `helloWorld()` function will be run on a * server using AegisBlade. */ { console; return `Hello World from `;} // Any target function to be run on AegisBlade must be exported.moduleexports = helloWorld; /** * The `main()` function will run on your local machine * and start the job running the `helloWorld()` function * on a server using AegisBlade. */ { let job = await aegisblade; console; console; let jobReturnValue = await job; let jobLogs = await job; console; console;} // Using the `require.main === module` idiom to only run main when this script// is called directly is especially important when using AegisBlade to prevent// infinite loops of jobs creating jobs.if requiremain === module async { try await ; catch err console; };