Skip to content

Commit 8b0bbba

Browse files
committed
Primitive logging added
1 parent 02d525c commit 8b0bbba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ var server = http.createServer((request, response) => {
55
var body = '';
66
request.on('data', (chunk) => {
77
body += chunk;
8+
console.log('chunk recieved');
89
});
910
request.on('end', () => {
11+
console.log('request ended');
1012
try {
1113
var options = JSON.parse(body);
1214
var httpsResult = '';
1315
var httpsRequest = https.request(options, (httpsResponse) => {
1416
httpsResponse.on('data', (data) => {
1517
httpsResult += data;
18+
console.log('https chunk recieved');
1619
});
1720
httpsResponse.on('end', () => {
1821
response.end(httpsResult);
22+
console.log('https response ended');
1923
});
2024
});
2125
httpsRequest.end();
@@ -27,3 +31,4 @@ var server = http.createServer((request, response) => {
2731
});
2832

2933
server.listen('4200');
34+
console.log('start listening');

0 commit comments

Comments
 (0)