Commit ea1fc442 authored by Rucha Deshpande's avatar Rucha Deshpande
Browse files

Add SSL conditions

parent 3435fc84
Pipeline #32195 failed with stages
in 15 minutes and 45 seconds
......@@ -124,12 +124,11 @@ export class Server {
// SSL
if (process.env.SSL_ENABLED === 'true'){
const privateKey = fs.readFileSync(process.env.SSL_KEY_PATH, 'utf8');
const certificate = fs.readFileSync(process.env.SSL_CERT_PATH, 'utf8');
const credentials = {key: privateKey, cert: certificate};
if (process.env.SSL_ENABLED === 'true'){
this.httpsServer = https.createServer(credentials, this.app).listen(this.port, () => {
this.httpsServer = https.createServer(credentials, this.app).listen(this.port, () => {
// tslint:disable-next-line
console.log(`- Server is listening on port ${this.port}...`);
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment