mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Fix HttpNodeInstanceEntryPoint to match latest NPM modules
This commit is contained in:
@@ -128,9 +128,8 @@
|
|||||||
ExitWhenParentExits_1.exitWhenParentExits(parseInt(parsedArgs.parentPid));
|
ExitWhenParentExits_1.exitWhenParentExits(parseInt(parsedArgs.parentPid));
|
||||||
function readRequestBodyAsJson(request, callback) {
|
function readRequestBodyAsJson(request, callback) {
|
||||||
var requestBodyAsString = '';
|
var requestBodyAsString = '';
|
||||||
request
|
request.on('data', function (chunk) { requestBodyAsString += chunk; });
|
||||||
.on('data', function (chunk) { requestBodyAsString += chunk; })
|
request.on('end', function () { callback(JSON.parse(requestBodyAsString)); });
|
||||||
.on('end', function () { callback(JSON.parse(requestBodyAsString)); });
|
|
||||||
}
|
}
|
||||||
function respondWithError(res, errorValue) {
|
function respondWithError(res, errorValue) {
|
||||||
res.statusCode = 500;
|
res.statusCode = 500;
|
||||||
|
|||||||
@@ -80,9 +80,8 @@ exitWhenParentExits(parseInt(parsedArgs.parentPid));
|
|||||||
|
|
||||||
function readRequestBodyAsJson(request, callback) {
|
function readRequestBodyAsJson(request, callback) {
|
||||||
let requestBodyAsString = '';
|
let requestBodyAsString = '';
|
||||||
request
|
request.on('data', chunk => { requestBodyAsString += chunk; });
|
||||||
.on('data', chunk => { requestBodyAsString += chunk; })
|
request.on('end', () => { callback(JSON.parse(requestBodyAsString)); });
|
||||||
.on('end', () => { callback(JSON.parse(requestBodyAsString)); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function respondWithError(res: http.ServerResponse, errorValue: any) {
|
function respondWithError(res: http.ServerResponse, errorValue: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user