Chapter 11: Consuming a Microservice sample update
This commit is contained in:
@@ -41,8 +41,3 @@ app.use(function(err, req, res, next) {
|
||||
});
|
||||
|
||||
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", {
|
||||
books: json,
|
||||
})
|
||||
)
|
||||
.catch((error) => {
|
||||
res.render("error", {
|
||||
error: error,
|
||||
message: error.message,
|
||||
});
|
||||
});
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
router.post("/add", function (req, res) {
|
||||
console.log(req.body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user