Nodejs Report Errors and Seek Solutions

  node.js, question

//server module
var http=require(‘http’);
var url=require(‘url’);
function start(route,handle){

function onRequest(request,response){
 var pathname=url.parse(request.url).pathname;
 Log ('requestfor' plus pathname plus' recieved');
 route(handle,pathname,response);
 bracket
 http.createServer(onRequest).listen(8888);
 console.log('http server start');

bracket
exports.start=start;

//program processing module
var exec=require(‘child_process’).exec;
function start(response){

console.log("Request handler 'start' was called.");
 exec('ls-lah',function(error,stdout,stderr){
 response.writeHead(200,{'Content-Type':'text/plain'});
 response.write(stdout);
 response.end();
 });

bracket
function upload(response){

console.log("Request handler 'upload' was called.");
 response.writeHead(200,{'Content-Type':'text/plain'});
 response.write('Hello World');
 response.end();

bracket
exports.start=start;
exports.upload=upload;

//routing module
function route(handle,pathname,response){

Log ('about to route a request for' plus pathname');
 if(typeof handle[pathname]==='function'){
 handle[pathname](response);
 }else{
 Log ('norequestfound for' plus pathname);
 response.writeHead(404,{'Content-Type':'text/plain'});
 response.write('404 Not Found');
 response.end();
 bracket

bracket
exports.route=route;

//master file
var server=require(‘./server’);
var router=require(‘./routes’);
var requestHandlers=require(‘./requestHandler’);
var handle={};
handle[‘/’]=requestHandlers.start;
handle[‘/start’]=requestHandlers.start;
handle[‘/upload’]=requestHandlers.upload;

server.start(router.route,handle);

The above is the procedure of the control tutorial, Native Code. As a result, I will report an error here, as shown in the figure below.图片描述

The error reporting is not quite clear, line 495 did not read the correct caseSensitive, you can find out if this attribute exists.