UNPKG

@proca/widget

Version:

Proca is an open-source campaign toolkit designed to empower activists and organisations in their digital advocacy efforts. It provides a flexible and customisable platform for creating and managing online petitions, email campaigns, and other forms of di

16 lines (14 loc) 426 B
require("dotenv").config(); const { fetch } = require("./config.js"); (async () => { const argv = process.argv.slice(2); const id = parseInt(process.env.actionpage || argv[0]); if (!id) throw "need actionpage={id} or fetch {id}"; try { const d = await fetch(parseInt(id, 10)); console.log(JSON.stringify(d, null, 2)); } catch (e) { console.error(e); // Deal with the fact the chain failed } })();