Posts

Showing posts from May, 2024

Express JS - Server Side Basics and Form Handling

Updated on: Dec. 2, 2025 Below listed programming tasks are designed to practice different concepts of server side web programming using Express JS and related packages. These small tasks are designed to understand the core web concepts' implementation. Before you implement below tasks, its suggested to go through provided code samples, run and understand them. It would make it easy to do the below tasks. To complete this task, you need to understand: Starting server in express that listen for HTTP requests Maping HTTP request to a handler defined in express. based on HTTP Method and URL Pattern Reading query string parameters using req.query object Using EJS to render dynamic data Here is the task description: Make a header in header.ejs and include this header in all EJS templates you create. In same way, make a footer in footer.ejs and include it all other EJS tempates. In script where you define your request handlers, initialize a global array of objects where each object s...

Create an Address Book using Express and EJS

 Create an application using Express, the application shall have following features: Make a JSON file named users.json. It shall be an array of objects where each object shall represent a contact person detail. Only 2-3 records are sufficient. Use following fields for each object: name, gender, email, city, phone number. Below given description is about different operations that you shall implement in your app to perform CRUD operations on file. List all records:  At /home ... list only contact persons' names in tabular form. The table shall have columns: ID, Name, Operations. Display user ID in ID column, Operations column shall have two links or buttons i.e. Update, Delete. When these links or buttons are clicked, pass user id to /update and /delete handler. Update Record When user click Update link or button, GET request shall be sent to server to URL pattern /update. Pass user id as query-string e.g. /update?id=10. The /update handler shall open the Update Form where earli...