Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created May 18, 2016 12:08
Show Gist options
  • Save ccapndave/7a19df192ef00bada11eb6d6810e29de to your computer and use it in GitHub Desktop.
Save ccapndave/7a19df192ef00bada11eb6d6810e29de to your computer and use it in GitHub Desktop.
function encryptMiddleware(req, res, next) {
console.log("Hello there");
console.log(res.body);
res.body = "";
next();
}
const router = express.Router();
router
.use(express.static(contentConfig.path))
.use(encryptMiddleware);
// Add the content to the app
app.use(`/blah`, router);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment