diff options
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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)); |