title: In Express JS, post() method is working perfectly in firebase cloud function after deploying but not working in local machine
body: <p><a href="https://i.stack.imgur.com/bIbOD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bIbOD.png" alt="enter image description here" /></a>I have one post() and get() request in Express JS. My post() request is not working in local machine.It is throwing 404 error and message <strong>&quot;Cannot POST /sendMessages/&quot;</strong>.However, when I deploy the app to the firebase cloud function and tested the requests both are working perfect. So, every time when I made changes I had to deploy and then test which is a tedious task.</p>
  <pre><code>    const functions = require(&quot;firebase-functions&quot;);    
      const express = require('express');
      var bodyParser = require('body-parser');
      var cors = require('cors')
      const PORT = 3000;
      const app = express()
  app.use(express.json())
  
  app.use(cors())
  
  app.get('/hello', (req, res, next) =&gt; {
      res.send('Welcome')
  })
  
  app.post('/sendMessages', (req, res) =&gt; {
  
      console.log(req.body)
  res.json({ 'status': 'Success' })
  })
  
  app.listen(PORT, () =&gt; {
      console.log(&quot;Server is running on port, &quot; + PORT)
  })
  
  exports.app = functions.https.onRequest(app)
  </code></pre>
  <p>Can anyone please tell me what's the issue. Thanks in advance.</p>