Function sendFile

Generates a function to send files on the application response.

  // Let's say this is inside an Express middleware.
// Get the function
const send = sendFile(pathUtils);
send({ res, filepath: 'some-file.html', next });
// If your app is on "/app/index.js", this will send "/app/some-file.html".