res.sendFile(path_to_file); is all you need; it will automatically set the correct headers and transfer the file (it internally uses the same code as express.static).
In express versions less than 4, use sendfile instead of sendFile.
res.sendFile(path_to_file); is all you need; it will automatically set the correct headers and transfer the file (it internally uses the same code as express.static).
In express versions less than 4, use sendfile instead of sendFile.