Practice JavaScript, Setup Node, NPM and Explore Some Methods of HTTP Module

  1. Prepare code samples to demonstrate usage of following concepts in JS:
    1. Fat Arrow functions
    2. Create modules, export it and use it by importing into another module
    3. Create classes that extends another class. create its object and use it.
    4. Spread operator with usage in arrays and objects
    5. Object Destructuring

  2. Please make use of validator packages and validate different types of data using: https://www.npmjs.com/package/validator

  3. Makeuse of different methods in string module https://www.npmjs.com/package/@stdlib/string you an use any module from npm. searcing "string utils"

  4. Create different http handlers to perform following tasks (you can do each task in different file too):
    1. extract data received in query string and write that data to http response. For example, if user send request to a url like below:
      http://localhost:8000/processdata?name=ali&age=20&city=Lahore 
      The handler should write these data attributes on response.
    2. Send custom headers to response e.g. Content-Length, content-type, 
    3. Print all headers recevied in http request.
    4. Print which HTTP method the request used
    5. Store a sample file that contains multiple users data in json format. Sender only object whose ID is received in http request as query string with parameter name user_id
    6. In an HTML table have two column. Render all headers name and theis values received in http request

Comments