htpasswd with node.js

Hi - has anyone had success using the htpasswd module for either basic
or digest authentication for pages served by node.js?

If so, could you provide an example of how it's used?

I'll readily admit I'm a node newbie, but I cannot turn the example
provided on the git page into working authentication.



Hi Mike,

Sorry for late response, just install it using global flag - "npm install -g htpasswd" and after start using it as regular command line client by typing htpasswd in terminal. Usage is similar to Apache2 server utility, if you still need it and have problems, please let me know.


I am also trying to password protect my node.js website running on port 8000. I have installed htpasswd and created a password file using htpasswd -c . But I am not sure how to proceed further. Can you please help me?

I googled it for you: