Import Required Packages
First step of building our example task is importing all the required packages. It is possible to import any package from NPM at the beginning of your file just the same as you would in any nodejs file.
const cron = require('node-cron');
const fs = require('fs');
const NODE_MODE_SERVICE = 'service';
const axios = require('axios');
// Using Web3Storage to make uploading to IPFS easier
const { Web3Storage, getFilesFromPath } = require('');
const storageClient = new Web3Storage({ token: process.env.WEB3_STORAGE_KEY });
Copy link