The issue was as follows:
-
I was wrong! We could use Promises!
-
We needed to both move the code server-side (so that we could reference the
process.env
variables) and also instantiate the SDK like this:
const { apiClient } = require('giphy-js-sdk-core');
const giphy = new apiClient(process.env.GIPHY_KEY);
You can see a working version of this at jeweled-wormhole
– credit to @khalby786 for the base code!