Posts

Showing posts from 2023

Express Form Handling, File Upload, EJS, Redirect

Consider below HTML form. Its not mandatory to use same form, you can modify fields. What is important is, your form shall include all basic types of input fields e.g. text, password, radio, checkbox, option list, text area, etc. After this form, there are list of tasks that you should implement in same web app. <title>Form with all controls</title> <style> label { display: inline-block; width: 100px; }</style>  <h1>User Registration Form</h1> <form action="form-handler" method="POST">   <h2> Student Registration Form</h2>   <label>Name</label><input maxlength="8" name="name" size="20" type="text">   <label>Password</label> <input name="password" size="20" type="password">    <label>Subjects</label>   <input name="Algorithms" type="checkbox"> Algorithms   <input name=&

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

Prepare code samples to demonstrate usage of following concepts in JS: Fat Arrow functions Create modules, export it and use it by importing into another module Create classes that extends another class. create its object and use it. Spread operator with usage in arrays and objects Object Destructuring Please make use of validator packages and validate different types of data using:  https://www.npmjs.com/package/validator Makeuse of different methods in string module  https://www.npmjs.com/package/@stdlib/string you an use any module from npm. searcing "string utils" Create different http handlers to perform following tasks (you can do each task in different file too): 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. Send custom headers to response e.g. Content-Le