From e841cc6cc55a50f3d60bfb6a8c8702b8778326b4 Mon Sep 17 00:00:00 2001 From: nousername-anonymous <33590724+nousername-anonymous@users.noreply.github.com> Date: Fri, 25 Oct 2019 21:11:11 +0530 Subject: [PATCH 1/2] Create README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca6f907 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# PackageDelivery +It's a project in which we keep a record of all the package and generate OTP for each student which is needed to be present at the time of approval of his/her package. From 84183c660fa163d9f613c370f85da70667680a04 Mon Sep 17 00:00:00 2001 From: nousername-anonymous <33590724+nousername-anonymous@users.noreply.github.com> Date: Fri, 25 Oct 2019 21:15:17 +0530 Subject: [PATCH 2/2] Update index.js --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bf91a1e..21f55dd 100644 --- a/index.js +++ b/index.js @@ -55,13 +55,16 @@ app.post("/register", (req, res) => { }); } }) - }); +app.get("*", (req, res) => { + res.send({message: 'Error 404! Page Not Found'}); +} + app.listen(process.env.PORT, (err) => { if (err) { console.log("Error in running server"); return; } console.log(`Server is up and running on http://localhost:${process.env.PORT}`); -}); \ No newline at end of file +});