2014-07-15 03:20:49 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var https = require('https')
|
|
|
|
, fs = require('fs')
|
|
|
|
, path = require('path')
|
2014-07-16 04:54:02 +00:00
|
|
|
, ca = fs.readFileSync(path.join(__dirname, 'certs', 'client', 'my-root-ca.crt.pem'))
|
2014-07-15 03:38:33 +00:00
|
|
|
, port = process.argv[2] || 8043
|
|
|
|
, hostname = process.argv[3] || 'local.ldsconnect.org'
|
2014-07-15 03:20:49 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
var options = {
|
2014-07-15 03:38:33 +00:00
|
|
|
host: hostname
|
2014-07-15 03:20:49 +00:00
|
|
|
, port: port
|
|
|
|
, path: '/'
|
|
|
|
, ca: ca
|
|
|
|
};
|
|
|
|
options.agent = new https.Agent(options);
|
|
|
|
|
|
|
|
https.request(options, function(res) {
|
|
|
|
res.pipe(process.stdout);
|
|
|
|
}).end();
|