title: Cannot POST / With Post request from non '/' site
body: <p>I am new to Node and am having trouble with the POST functionality.
  I have a simple website, where I have the following lines:</p>
  <pre><code>app.get('/sign',(req,res)=&gt;{
      res.sendFile(path.join(__dirname, 'static', 'index.html'));
  });
  
  app.post('/sign', (req,res)=&gt;{
      res.send(&quot;Success!&quot;)
  });
  </code></pre>
  <p>The get request works perfectly fine, but when I post the data in the form back, instead of getting a success message, I get <code>Cannot POST /</code>.
  When doing the same from the '/' directory with <code>app.get('/', etc.)</code>
  it works fine.</p>
  <p>This is the content of the 'index.html' file:</p>
  <pre><code>&lt;form action = '/' method='POST' id=&quot;form&quot;&gt;
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;label for=&quot;emal&quot;&gt;Email address&lt;/label&gt;
          &lt;input type=&quot;email&quot; class=&quot;form-control&quot; name=&quot;email&quot;&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;label for=&quot;pwd&quot;&gt;Password&lt;/label&gt;
          &lt;input type=&quot;password&quot; class=&quot;form-control&quot; name=&quot;password&quot;&gt;
      &lt;/div&gt;
      &lt;button type=&quot;submit&quot; class=&quot;btn btn-default&quot;&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>