Using require(' ') in client side

The issue was as follows:

  1. I was wrong! We could use Promises!

  2. 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!