From 2ee0078cfd8e2936a51dd6ecfb813d83b03a6ce5 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Thu, 15 Sep 2016 14:15:03 +0100 Subject: [PATCH] Fix HttpNodeInstanceEntryPoint to match latest NPM modules --- .../Content/Node/entrypoint-http.js | 5 ++--- .../TypeScript/HttpNodeInstanceEntryPoint.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.AspNetCore.NodeServices/Content/Node/entrypoint-http.js b/src/Microsoft.AspNetCore.NodeServices/Content/Node/entrypoint-http.js index cfa15bc..b085a36 100644 --- a/src/Microsoft.AspNetCore.NodeServices/Content/Node/entrypoint-http.js +++ b/src/Microsoft.AspNetCore.NodeServices/Content/Node/entrypoint-http.js @@ -128,9 +128,8 @@ ExitWhenParentExits_1.exitWhenParentExits(parseInt(parsedArgs.parentPid)); function readRequestBodyAsJson(request, callback) { var requestBodyAsString = ''; - request - .on('data', function (chunk) { requestBodyAsString += chunk; }) - .on('end', function () { callback(JSON.parse(requestBodyAsString)); }); + request.on('data', function (chunk) { requestBodyAsString += chunk; }); + request.on('end', function () { callback(JSON.parse(requestBodyAsString)); }); } function respondWithError(res, errorValue) { res.statusCode = 500; diff --git a/src/Microsoft.AspNetCore.NodeServices/TypeScript/HttpNodeInstanceEntryPoint.ts b/src/Microsoft.AspNetCore.NodeServices/TypeScript/HttpNodeInstanceEntryPoint.ts index f8e619d..eb7fc28 100644 --- a/src/Microsoft.AspNetCore.NodeServices/TypeScript/HttpNodeInstanceEntryPoint.ts +++ b/src/Microsoft.AspNetCore.NodeServices/TypeScript/HttpNodeInstanceEntryPoint.ts @@ -80,9 +80,8 @@ exitWhenParentExits(parseInt(parsedArgs.parentPid)); function readRequestBodyAsJson(request, callback) { let requestBodyAsString = ''; - request - .on('data', chunk => { requestBodyAsString += chunk; }) - .on('end', () => { callback(JSON.parse(requestBodyAsString)); }); + request.on('data', chunk => { requestBodyAsString += chunk; }); + request.on('end', () => { callback(JSON.parse(requestBodyAsString)); }); } function respondWithError(res: http.ServerResponse, errorValue: any) {