Avoid square-bracket notation when accessing properties JS-0049
Anti-pattern
Minor
a year ago2 years old
["ports"] is better written in dot notation
403
404httpsServer = spdy.createServer(credentials,app)
405//httpsServer = https.createServer(credentials, app);
406httpsServer.listen(config["ports"]["https"], function () {407    console.log(5, "HTTPS Server is listening");
408});
409
["https"] is better written in dot notation
403
404httpsServer = spdy.createServer(credentials,app)
405//httpsServer = https.createServer(credentials, app);
406httpsServer.listen(config["ports"]["https"], function () {407    console.log(5, "HTTPS Server is listening");
408});
409
["ssl"] is better written in dot notation
395    console.log(5, "HTTP Server is listening");
396});
397const privateKey = readFileSync(config["ssl"]["privateKey"]).toString();
398const certificate = readFileSync(config["ssl"]["certificate"]).toString();399const credentials = { key: privateKey, cert: certificate };
400var httpsServer;
401
["certificate"] is better written in dot notation
395    console.log(5, "HTTP Server is listening");
396});
397const privateKey = readFileSync(config["ssl"]["privateKey"]).toString();
398const certificate = readFileSync(config["ssl"]["certificate"]).toString();399const credentials = { key: privateKey, cert: certificate };
400var httpsServer;
401
["ssl"] is better written in dot notation
394httpServer.listen(config["ports"]["http"], function () {
395    console.log(5, "HTTP Server is listening");
396});
397const privateKey = readFileSync(config["ssl"]["privateKey"]).toString();398const certificate = readFileSync(config["ssl"]["certificate"]).toString();
399const credentials = { key: privateKey, cert: certificate };
400var httpsServer;