http POST not reaching backend : <p>I'm trying to pass an email value to the backend, but it never reaches the endpoint. I have the same url path being called, but <code>console.log("You've made it to the backend");</code> never outputs. Why is that? It's definitely hitting the angular service because Made It outputted to console no problem.</p>

<p>angular service</p>

<pre><code>import { Injectable } from "@angular/core";
import { HttpClient, HttpParams } from "@angular/common/http";
import { Router } from "@angular/router";
import { PasswordReset } from "./password.model";

@Injectable({ providedIn: "root" })
export class PasswordResetService {
  constructor(private http: HttpClient, private router: Router) {}

  sendEmail(email: string) {
    const password: PasswordReset = {
      email: email
    };
    console.log("Made It");
    return this.http.post(
      `http://localhost:3000/api/users/passwordreset`,
      password
    );
  }
}
</code></pre>

<p>app.js</p>

<pre><code>app.post("/api/users/passwordreset", function(req, res) {

console.log("You've made it to the backend");
let emailValue = req.body.email;

  if (req.body.email !== undefined) {
    User.findOne({ email: req.body.email })
    .then(user =&gt; {
      if(user){
        console.log("fetchedUser");
        console.log(user._id);
        var payload = {
          id: user._id,
          email: user.email
        };

         var secret = user.password + "-" + user.passwordCreated;
         console.log("THE SECRET IS: " + secret);
         var token = jwt.sign(payload, secret);
         console.log("payload");
         console.log(payload);

         var ses_mail = "From: 'Auction Site' &lt;" + emailValue+ "&gt;\n";
         ses_mail = ses_mail + "To: " +emailValue + "\n";
         ses_mail = ses_mail + "Subject: Password Reset Request\n";
         ses_mail = ses_mail + "MIME-Version: 1.0\n";
         ses_mail = ses_mail + "Content-Type: multipart/mixed; boundary=\"NextPart\"\n\n";
         ses_mail = ses_mail + "--NextPart\n";
         ses_mail = ses_mail + "Content-Type: text/html; charset=us-ascii\n\n";
         ses_mail = ses_mail + '&lt;a href="http://localhost:3000/resetpassword/' + payload.id + '/' + token + '"&gt;Click here to reset password&lt;/a&gt;';
       //  /:id/:token

         var params = {
           RawMessage: { Data: new Buffer.from(ses_mail) },
           Destinations: [emailValue ],
           Source: "'AWS Tutorial Series' &lt;" + emailValue + "&gt;'"

       };

         ses.sendRawEmail(params, function(err, data) {
          if(err) {

              res.send(err);
              console.log(err);
          }
          else {
              res.send(data);
          }
      })

    }
      if (!user) {
        return res.status(401).json({
          message: "Auth failed"
        });
      }


    });


  } else {
    res.send("Email address is missing.");
  }
});
</code></pre>
