title: Google Cloud Functions: required/exported functions throw "handler is not a function" error
body: <p>This works:</p>
  
  <pre><code>// index.js
  module.exports = {
    getItems: (req, res) =&gt; res.send("Hello, World!")
  };
  </code></pre>
  
  <p>testing with <code>functions call getItems</code> yields <code>Result: Hello, World!</code></p>
  
  <p>This does not work</p>
  
  <pre><code>// getItems.js
  exports.getItems = (req, res) =&gt; res.send("Hello, World!");
  
  // index.js
  let getItems = require('./getItems');
  
  module.exports = {
    getItems
  };
  </code></pre>
  
  <p>testing with <code>functions call getItems</code> yields <code>Error: TypeError: handler is not a function
      at app.use.err (/Users...</code></p>
  
  <p>What's the issue?</p>