Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
ea1fc442
Commit
ea1fc442
authored
Mar 17, 2021
by
Rucha Deshpande
Browse files
Add SSL conditions
parent
3435fc84
Pipeline
#32195
failed with stages
in 15 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/server/server.ts
View file @
ea1fc442
...
...
@@ -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
}
...`
);
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment