read/write htpasswd files
npm install --save htpasswd-auth
var htpasswd = require('htpasswd-auth');
var file = fs.readFileSync('./path-to-htpasswd', 'utf-8');
htpasswd.authenticate('dickeyxxx', 'pass', file)
.then(function (auth) {
// auth is true if the password is valid
});