Commit 5edcdba8e38d91379ccd4f2658460bfc59712b9a

Authored by Adhidarma Hadiwinoto
1 parent 934897b153
Exists in master

typo

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

1 "use strict"; 1 "use strict";
2 2
3 process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; 3 process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
4 4
5 const fs = require('fs'); 5 const fs = require('fs');
6 const config = require(__dirname + '/config.json'); 6 const config = require(__dirname + '/config.json');
7 7
8 fs.existsSync('certs') || fs.mkdirSync('certs'); 8 fs.existsSync('certs') || fs.mkdirSync('certs');
9 9
10 const redbird = require('redbird')(config.server_options); 10 const redbird = require('redbird')(config.server_options);
11 11
12 const hostsCount = config.hosts.length; 12 const hostsCount = config.hosts.length;
13 for (let i=0; i < hostsCount; i++) { 13 for (let i=0; i < hostsCount; i++) {
14 let host = config.hosts[i] 14 let host = config.hosts[i]
15 console.log(`Registering ${host.host} to ${host.target}`); 15 console.log(`Registering ${host.host} to ${host.target}`);
16 if (!host.disable) { 16 if (!host.disable) {
17 const options = host.options ? config.default_host_options; 17 const options = host.options || config.default_host_options;
18 if (!options) { 18 if (!options) {
19 redbird.register(host.host, host.target); 19 redbird.register(host.host, host.target);
20 } 20 }
21 else { 21 else {
22 redbird.register(host.host, host.target, options); 22 redbird.register(host.host, host.target, options);
23 } 23 }
24 24
25 } 25 }
26 } 26 }
27 27