How to serve a file using iron router or meteor itself?
On the server: var fs = Npm.require(‘fs’); var fail = function(response) { response.statusCode = 404; response.end(); }; var dataFile = function() { // TODO write a function to translate the id into a file path var file = fileFromId(this.params.id); // Attempt to read the file size var stat = null; try { stat = fs.statSync(file); … Read more