Pass requestCert to https.createServer
This commit is contained in:
parent
eb621217f9
commit
7e9f540194
1 changed files with 8 additions and 2 deletions
10
lib/app.js
10
lib/app.js
|
|
@ -57,8 +57,14 @@ config.load(function(err, conf) {
|
|||
var testkeys = path.join(__dirname, '..', 'testkeys');
|
||||
var privateKey = fs.readFileSync(path.join(testkeys, 'privatekey.pem'));
|
||||
var certificate = fs.readFileSync(path.join(testkeys, 'certificate.pem'));
|
||||
var credentials = {key: privateKey, cert: certificate};
|
||||
https.createServer(credentials, app).listen(port, function () {
|
||||
|
||||
var options = {
|
||||
key: privateKey,
|
||||
cert: certificate,
|
||||
requestCert: true
|
||||
};
|
||||
|
||||
https.createServer(options, app).listen(port, function () {
|
||||
console.log('Express server listening on port ' + port + ' (https)');
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue