First Reffer to written notes in not book
Task 1 : Creating a server.
- we need http module to make server.
- To create a server we need method called createServer() which takes two parameter request and response .
- This createServer function has two objects provided by node js request and response object. and it get triggered when it gets request.
- This createServer() will create the server and you can tell that server to start working by calling .listen() method this listen() method taken 1 argument port number on which port number our server should be run.
- For this step it only consoles hello world everytime you run the server in short everytime you trigger createServer() function
Task 2: Understanding Request and Response Object:
A) REFER reqServer.js we have consoled the req object of the .createServer() method which consist of so many things like : 1) Which device your using to access server 2) which browser your using to access server 3) which platform? and etc etc
B) Refer resServer.js then refer C) chnageResponse.js