You are reading a single comment by @AaronB and its replies. Click here to read the full conversation.
  • Thanks, I had looked at the examples and have used it previously, clearly I needed to sleep on it but I think I get it now.

    I could type:

    192.168.0.13/set?23

    function onPageRequest(req, res) {
      var a = url.parse(req.url, true);
      if (a.pathname=="/set") {
    targetRoomTemp= a.query
    }
    

    to change the varible 'targetRoomTemp' to 23?

    Or with 192.168.0.13/set/23

    function onPageRequest(req, res) {
      var a = url.parse(req.url, true);
      'a.pathname'.split('/')==[1,2,3];
    
      if (a.pathname(2)=="/set") {
    targetRoomTemp= a.pathname(3);
    }
    
About

Avatar for AaronB @AaronB started