<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h2>Login Api In Nodejs</h2>
</div>
</div>
app.post('/login', async (req, resp) => {
if (req.body.email && req.body.password) {
let user = await User.findOne(req.body).select("-password");
if (user) {
resp.send(user);
} else {
resp.send({ result: "Not Found!!!" })
}
} else {
resp.send({ result: "Not Found!!!" })
}
});