I\'m reading a getting started book on node.js called The Node Beginner Book and in the code below (given in the book) I don\'t understand the significance
pathname is the part of URL section that comes after server and port. In,var pathname = url.parse(request.url).pathname; the request.url ,requests the url from the URL Section which is the set of the component - IP address of localhost , port no and file pathname.
Let understand it by an example suppose this is the url to be requested to server http://127.0.0.1:8082/ but for response to the client there should be an html file let it be index.html then http://127.0.0.1:8080/index.html and this html file is the .pathname to the url. So,In var pathname = url.parse(http://127.0.0.1:8080/index.html).pathname the pathname is index.html that is response to client.