Skip to content

Instantly share code, notes, and snippets.

@cianclarke
Created April 12, 2016 14:49
Show Gist options
  • Save cianclarke/0b491913a5308e9c792d738ecf8e59fc to your computer and use it in GitHub Desktop.
Save cianclarke/0b491913a5308e9c792d738ecf8e59fc to your computer and use it in GitHub Desktop.
Get the file descriptor fount
app.get('/fd', function(req, res){
var fs = require('fs');
fs.readdir('/proc/self/fd', function(err, list) {
if (err) {
return res.status(500).json(err);
}
return res.end(list.length.toString());
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment