mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-26 11:37:31 +00:00
Normalise trailing whitespace and line endings everywhere
This commit is contained in:
@@ -24,7 +24,7 @@ var server = http.createServer(function(req, res) {
|
||||
hasSentResult = true;
|
||||
if (errorValue) {
|
||||
res.statusCode = 500;
|
||||
|
||||
|
||||
if (errorValue.stack) {
|
||||
res.end(errorValue.stack);
|
||||
} else {
|
||||
@@ -41,19 +41,19 @@ var server = http.createServer(function(req, res) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
func.apply(null, [callback].concat(bodyJson.args));
|
||||
} catch (synchronousException) {
|
||||
callback(synchronousException, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
server.listen(requestedPortOrZero, 'localhost', function () {
|
||||
// Signal to HttpNodeHost which port it should make its HTTP connections on
|
||||
console.log('[Microsoft.AspNet.NodeServices.HttpNodeHost:Listening on port ' + server.address().port + '\]');
|
||||
|
||||
|
||||
// Signal to the NodeServices base class that we're ready to accept invocations
|
||||
console.log('[Microsoft.AspNet.NodeServices:Listening]');
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ function invocationCallback(errorValue, successValue) {
|
||||
}
|
||||
|
||||
readline.createInterface({ input: process.stdin }).on('line', function (message) {
|
||||
if (message && message.substring(0, invocationPrefix.length) === invocationPrefix) {
|
||||
if (message && message.substring(0, invocationPrefix.length) === invocationPrefix) {
|
||||
var invocation = JSON.parse(message.substring(invocationPrefix.length));
|
||||
var invokedModule = require(path.resolve(process.cwd(), invocation.moduleName));
|
||||
var func = invocation.exportedFunctionName ? invokedModule[invocation.exportedFunctionName] : invokedModule;
|
||||
|
||||
Reference in New Issue
Block a user