πŸ“… 2023-12-27 β€” Session: Developed and Debugged Backend for JSON Web App

πŸ•’ 22:50–23:30
🏷️ Labels: Node.Js, Express, Javascript, Backend, Error Handling
πŸ“‚ Project: Dev
⭐ Priority: MEDIUM

Session Goal: To develop and debug the backend of a JSON-based web application using Node.js and Express.

Key Activities:

  • Set up a web server and created API endpoints using Node.js and Express.
  • Implemented search logic and response handling for client requests.
  • Resolved a Node.js error related to the server.js file not being found by verifying the file’s existence and location.
  • Addressed the β€˜Cannot GET /’ error in Express by defining a root endpoint and serving an HTML file.
  • Connected the frontend with the backend for an MVP using AJAX requests to update the UI with search results.
  • Implemented dropdown lists and search result areas in HTML using JavaScript.
  • Corrected discrepancies between HTML element IDs and JavaScript references to ensure proper display of search results.
  • Resolved Uncaught TypeError in JavaScript by ensuring scripts execute after the DOM is fully loaded.
  • Verified server and endpoint functionality in Node.js using Express, including debugging and testing with Postman.

Achievements:

  • Successfully set up and debugged the backend for the web application, resolving multiple errors and ensuring smooth integration between frontend and backend components.

Pending Tasks:

  • Further testing of API endpoints for edge cases and performance optimization.
  • Implement additional features for enhanced user interaction and data handling.