From e6b8297e3cb99dfc753015699c766612fc89655a Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Thu, 15 Apr 2021 13:03:15 -0500 Subject: I don't get Express routers --- csci4131/hw6/strap012_hw6/api/utilities.js | 3 ++- csci4131/hw6/strap012_hw6/index.js | 7 +----- csci4131/hw6/strap012_hw6/public/login.html | 38 ----------------------------- 3 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 csci4131/hw6/strap012_hw6/public/login.html (limited to 'csci4131/hw6') diff --git a/csci4131/hw6/strap012_hw6/api/utilities.js b/csci4131/hw6/strap012_hw6/api/utilities.js index 6b6cec6..eda6e72 100644 --- a/csci4131/hw6/strap012_hw6/api/utilities.js +++ b/csci4131/hw6/strap012_hw6/api/utilities.js @@ -3,8 +3,9 @@ const router = express.Router() router.get('/contacts', function (req, res) { // TODO: Implement code to fetch contacts from the database + res.send("AAAAAAAAAAAA") }); // TODO: Add implementation for other necessary end-points -module.exports = router; \ No newline at end of file +module.exports = router; diff --git a/csci4131/hw6/strap012_hw6/index.js b/csci4131/hw6/strap012_hw6/index.js index 6ce24c2..965b23e 100644 --- a/csci4131/hw6/strap012_hw6/index.js +++ b/csci4131/hw6/strap012_hw6/index.js @@ -84,11 +84,6 @@ app.post('/logintry', function(req, res) { }); - -// TODO: Add implementation for other necessary end-points - - - // Makes Express use a router called utilities app.use('/api', utilities); @@ -107,4 +102,4 @@ app.use(function (err, req, res, next) { res.status(err.status || 500); // res.render('error'); res.send(); -}); \ No newline at end of file +}); diff --git a/csci4131/hw6/strap012_hw6/public/login.html b/csci4131/hw6/strap012_hw6/public/login.html deleted file mode 100644 index 34bbc8c..0000000 --- a/csci4131/hw6/strap012_hw6/public/login.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -
-
- - -
-
- - -
- -
- - - \ No newline at end of file -- cgit v1.2.3