Created
August 25, 2012 19:49
-
-
Save tmartineau/3470172 to your computer and use it in GitHub Desktop.
Stripped down example of using HTTP Authentication in Express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
httpAuth = express.basicAuth('user', 'pass'); | |
var app = module.exports = express.createServer(); | |
app.configure(function(){ | |
... | |
app.use(httpAuth); | |
... | |
}); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment