title: React App deployed on Digital ocean gives 404 Error
body: <p>I have a validation form on React but on clicking submit m getting &quot;404 Error&quot;.
  It works perfect on local machine.
  //from app.js</p>
  <pre><code>handleSubmit = async e =&gt; {
      e.preventDefault();
      const response = await fetch('/api/emailVerifier', {
        method: 'POST',
        body: this.state,
        headers: {
          'Content-Type': 'application/json',
        },
  
        //body: JSON.stringify({ post: this.state.post }),
  
      });
      const body = await response.text();
      
      this.setState({ responseToPost: body });
    };
  </code></pre>
  <p>//from server.js</p>
  <pre><code>app.post('/api/emailVerifier', async (req, res) =&gt; {
    console.log(req.body);
    const emailValidator = new EmailValidator();
    const { wellFormed, validDomain, validMailbox } = await emailValidator.verify(req.body.post);
    res.send(
  
      `response received , welllformed = ${wellFormed}, validDomain = ${validDomain}, validMailbox = ${validMailbox}`,
    );
  });
  </code></pre>
  <p>i have installed my my validator on server using  npm i add deep-email-validator --save</p>
  <p>My Directory on server has</p>
  <pre><code>asset-manifest.json  index.html   manifest.json      package.json  static
  build                logo192.png  node_modules       robots.txt
  favicon.ico          logo512.png  package-lock.json  server.js
  </code></pre>