Skip to content

Commit 6017446

Browse files
committed
Write a line to console output to indicate that the script is listening.
Issue mendhak#32
1 parent bddd45b commit 6017446

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ const sslOpts = {
9292
cert: require('fs').readFileSync('fullchain.pem'),
9393
};
9494

95-
var httpServer = http.createServer(app).listen(process.env.HTTP_PORT || 80);
96-
var httpsServer = https.createServer(sslOpts,app).listen(process.env.HTTPS_PORT || 443);
95+
var httpServer = http.createServer(app).listen(process.env.HTTP_PORT || 8080);
96+
var httpsServer = https.createServer(sslOpts,app).listen(process.env.HTTPS_PORT || 8443);
97+
console.log(`Listening on ports ${process.env.HTTP_PORT || 8080} and ${process.env.HTTPS_PORT || 8443}`);
9798

9899
let calledClose = false;
99100

tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ docker run -d --rm -e LOG_IGNORE_PATH=/ping --name http-echo-tests -p 8080:8080
202202
sleep 5
203203
curl -s -k -X POST -d "banana" https://localhost:8443/ping > /dev/null
204204

205-
if [ $(docker logs http-echo-tests | wc -l) == 1 ] && \
205+
if [ $(docker logs http-echo-tests | wc -l) == 2 ] && \
206206
! [ $(docker logs http-echo-tests | grep banana) ]
207207
then
208208
passed "LOG_IGNORE_PATH ignored the /ping path"
@@ -221,7 +221,7 @@ docker run -d --rm -e LOG_WITHOUT_NEWLINE=1 --name http-echo-tests -p 8080:8080
221221
sleep 5
222222
curl -s -k -X POST -d "tiramisu" https://localhost:8443/ > /dev/null
223223

224-
if [ $(docker logs http-echo-tests | wc -l) == 3 ] && \
224+
if [ $(docker logs http-echo-tests | wc -l) == 4 ] && \
225225
[ $(docker logs http-echo-tests | grep tiramisu) ]
226226
then
227227
passed "LOG_WITHOUT_NEWLINE logged output in single line"

0 commit comments

Comments
 (0)