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
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
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
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
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;
In JavaScript, there are two ways to access the properties of an object:
(object.property)
( Recommended )(object["property"])
( Bad Practice )The dot notation is preferred because it is easier to read, less verbose, and works better with aggressive JavaScript minimizers.
const x = object["property"];
const x = object.property;
x = object[y];