Skip to content

Instantly share code, notes, and snippets.

@paulobunga
Last active January 28, 2019 12:28
Show Gist options
  • Save paulobunga/f283c263be20d22c60f29ed49b2a26f0 to your computer and use it in GitHub Desktop.
Save paulobunga/f283c263be20d22c60f29ed49b2a26f0 to your computer and use it in GitHub Desktop.
//This is the file using the middleware below
const express = require('express');
const myMiddleware = require('./myMiddleware');
const app = express();
app.get('/', myMiddleware.logToConsole, (req, res) => {
res.send('Middleware example');
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment