I have a site hosted in aws from www.domain.com with 2 subdomains test.domain.com and stage.domain.com. I use MEAN for development, now what I want to do is password protect my subdomains test.domain.com and stage.domain.com, but just like we do in php using htaccess.
Now I personally like this htaccess approach, because in this approach your code for the application will be the same, authentication will be added by htaccess. Any idea how to do this in nodejs without changing the application code so that I can remove this in the future if I want .
PS: Only hints are welcome.
dipak1296
source share