Generates a function to send files on the application response.
To inject the required dependencies.
// 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". Copy
// 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".
Generates a function to send files on the application response.