title: Serve Vue,.js Pages with Express post with parameters
body: <p>I've an web application that can render sites embeded. The problem is that this site only send <strong>POST</strong> requests.</p>
  <p>So i thought about serving it using express, then i searched a little here i got the following code to serve it, listening to all <strong>GET</strong> requests as vuetify pages:</p>
  <pre class="lang-js prettyprint-override"><code>const express = require('express');
  const path = require('path');
  
  const hostname = 'localhost';
  const port = 3000;
  
  const app = express();
  app.use(express.static(path.join(__dirname, 'dist')));
  
  app.get('*', (req, res) =&gt; {
   res.sendFile(__dirname, '/dist/index.html');
  });
  
  app.listen(port, hostname, () =&gt; {
   console.log(&quot;Listening at http://%s:%s/&quot;, hostname, port);
  });
  </code></pre>
  <p>Then I thought to add a post method to, receiving the parameters the page sends:</p>
  <pre class="lang-js prettyprint-override"><code>const express = require('express');
  const path = require('path');
  
  const hostname = 'localhost';
  const port = 3000;
  
  const app = express();
  app.use(express.static(path.join(__dirname, 'dist')));
  
  app.get('*', (req, res) =&gt; {
   res.sendFile(__dirname, '/dist/index.html');
  });
  app.get('*', (req, res) =&gt; {
   res.sendFile(__dirname, '/dist/index.html');
  });
  
  app.post('/data', (req, res) =&gt; {
   const id = req.body.id;
   res.sendFile(__dirname, '/dist/index.html');
  });
  
  app.listen(port, hostname, () =&gt; {
  
   console.log(&quot;Listening at http://%s:%s/&quot;, hostname, port);
  });
  </code></pre>
  <p>How do i pass this argument to vue?</p>
  <p>Is this the best way to serve vue with a post request?</p>