accessories/sensor.js
//We need a function which handles requests and send response
We need a function which handles requests and send response
We need a function which handles requests and send response
function handleRequest(request, response){
          response.end('It Works!! Path Hit: ' + request.url);
          console.log('Server request received: ' + PORT);
          sensorService.getCharacteristic(Characteristic.MotionDetected).getValue();
      }
function handleRequest ( request , response ) { response . end ( 'It Works!! Path Hit: ' + request . url ) ; console . log ( 'Server request received: ' + PORT ) ; sensorService . getCharacteristic ( Characteristic . MotionDetected ) . getValue ( ) ; }
We need a function which handles requests and send response
We need a function which handles requests and send response