title: Express CANNOT POST after firebase function deployment
body: <p>I can make this method to work in local but i get <code>CANNOT POST /</code> and <code>CANNOT GET /</code> after deploying to firebase. Body of the <code>POST</code> and <code>GET</code> method is the <code>ipify api</code> to get information about the requesting IP.</p>
  <ul>
  <li>My local node.js version is v16.13.1</li>
  <li>Firebase node.js version is v14</li>
  <li>My Firebase is on Blaze (Pay as you go) plan</li>
  </ul>
  <p>Running and working fine in Local and tested with <em>POSTMAN</em> tool:</p>
  <pre><code>const request = require('request');
  const express = require('express');
  const bodyParser = require('body-parser');
  
  const app = express();
  app.use(bodyParser.urlencoded({ extended: false })); //application/x-www-form-urlencoded
  app.use(bodyParser.json()); //application/json
  app.route('/post').post((requests, responses) =&gt; {
    request('https://api64.ipify.org/?format=json', { json: true }, (err, ipfyResponse, body) =&gt; {
      responses.send(`
      ipfyResponse.statusCode: ${ipfyResponse.statusCode}\n
      ipfyResponse.statusMessage: ${ipfyResponse.statusMessage}\n
      `);
      console.log(ipfyResponse.body);
      console.log(ipfyResponse.headers);
      console.log(requests.body);
      console.log(requests.headers);
    });
  });
  app.listen(8080, () =&gt; console.log(`Server at localhost:8080`));
  </code></pre>
  <p>The function that i am deploying and gives me CANNOT POST and CANNOT GET response:</p>
  <pre><code>const functions = require(&quot;firebase-functions&quot;);
  const httprequest = require('request');
  const express = require('express');
  const bodyParser = require('body-parser');
  
  const app = express();
  app.use(bodyParser.urlencoded({ extended: false })); //application/x-www-form-urlencoded
  app.use(bodyParser.json()); //application/json
  app.post('/post', (requests, responses) =&gt; {
    httprequest('https://api64.ipify.org/?format=json', { json: true }, (err, ipfyResponse, body) =&gt; {
      if (err) { return console.log(err); }
      responses.send(`
      ipfyResponse.statusCode: ${ipfyResponse.statusCode}\n
      ipfyResponse.statusMessage: ${ipfyResponse.statusMessage}\n
      `);
    });
    console.log(ipfyResponse.body);
    console.log(ipfyResponse.headers);
    console.log(requests.body);
    console.log(requests.headers);
  });
  exports.post = functions.https.onRequest(app);
  
  app.get('/get', (requests, responses) =&gt; {
    httprequest('https://api64.ipify.org/?format=json', { json: true }, (err, ipfyResponse, body) =&gt; {
      if (err) { return console.log(err); }
      responses.send(`
      ipfyResponse.statusCode: ${ipfyResponse.statusCode}\n
      ipfyResponse.statusMessage: ${ipfyResponse.statusMessage}\n
      `);
    });
    console.log(ipfyResponse.body);
    console.log(ipfyResponse.headers);
    console.log(requests.body);
    console.log(requests.headers);
  });
  exports.get = functions.https.onRequest(app);
  </code></pre>
  <p>Im testing my <code>POST</code> firebase function with:</p>
  <pre><code>curl -X POST -d key=value --ssl https://us-central1-somethinsomethin.cloudfunctions.net/post
  </code></pre>
  <p>And testing the <code>GET</code> firebase function with my web browser (Edge)</p>