aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.js b/index.js
index cf59d6d..c0f595e 100644
--- a/index.js
+++ b/index.js
@@ -4,6 +4,14 @@ const members = require('./Members.js');
const app = express();
+const logger = (req, res, next) => {
+ console.log('Hello');
+ next();
+}
+
+// Init middleware
+app.use(logger);
+
// Gets all members
app.get('/api/members', (req, res) => res.json(members));