Added the following cli flags: ``` --protocol [protocol=http] --key [protocolOptions.key] --cert [protcolOptions.cert] --passphrase [protcolOptions.passphrase] ```
17 lines
492 B
JavaScript
17 lines
492 B
JavaScript
module.exports = function(argv) {
|
|
var SocketCluster = require('socketcluster').SocketCluster;
|
|
|
|
return new SocketCluster({
|
|
host: argv.hostname || null,
|
|
port: Number(argv.port) || 8000,
|
|
workerController: __dirname + '/worker.js',
|
|
allowClientPublish: false,
|
|
protocol: argv.protocol || 'http',
|
|
protocolOptions: !(argv.protocol === 'https') ? null : {
|
|
key: argv.key || null,
|
|
cert: argv.cert || null,
|
|
passphrase: argv.passphrase || null
|
|
}
|
|
});
|
|
};
|