Chapter 11: Consuming a Microservice sample update

This commit is contained in:
Beth Griggs
2020-11-15 00:34:50 +00:00
parent e3202cc0f4
commit 51fee88f90
2 changed files with 1 additions and 13 deletions
-5
View File
@@ -41,8 +41,3 @@ app.use(function(err, req, res, next) {
}); });
module.exports = app; module.exports = app;
process.on("unhandledRejection", (reason, promise) => {
console.log("Unhandled Rejection at:", promise, "reason:", reason);
process.exit(1);
});
@@ -10,16 +10,9 @@ router.get("/", function (req, res) {
res.render("inventory", { res.render("inventory", {
books: json, books: json,
}) })
) );
.catch((error) => {
res.render("error", {
error: error,
message: error.message,
});
});
}); });
router.post("/add", function (req, res) { router.post("/add", function (req, res) {
console.log(req.body); console.log(req.body);