Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save whynotavailable/9a948543ff2bfa86d801a37a1c0c18f3 to your computer and use it in GitHub Desktop.
Save whynotavailable/9a948543ff2bfa86d801a37a1c0c18f3 to your computer and use it in GitHub Desktop.
local.js
const axios = require('axios');
async function run() {
try {
const handler = require('./calls/' + process.argv[process.argv.length - 1]).handler
await handler();
} catch (error) {
console.error(error);
}
}
run().then(console.log).catch(console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment