Package Exports
- http-auth
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (http-auth) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
http-auth
Utility that is creating HTTP server with basic authentication.
Installation
Via git (or downloaded tarball):
$ git clone git://github.com/gevorg/http-auth.git
Via npm:
$ npm install http-auth
Usage
/**
* HTTP Auth library.
*/
var httpAuth = require('http-auth');
/**
* Creates private HTTP server.
*/
httpAuth.createServer('Sharon', 'bus412--', function(request, response) {
response.writeHead(200, {'Content-Type': 'text/html'});
response.end("<pre>Hi Sharon, welcome to private server.</pre>");
}).listen(8000);
Server startup params
- username - Username that will be used in basic authentication.
- password - Password that will be used in basic authentication.
- callback - Callback function that will be called after server will start.
License
The GPL version 3, read it at http://www.gnu.org/licenses/gpl.txt