Node.
js – Topics & Teaching Notes
1. [Link] Theory
• What is [Link] and why it is used.
• [Link] is a JavaScript runtime built on Chrome’s V8 engine.
• Single-threaded, event-driven, and non-blocking architecture.
• Where [Link] is used: APIs, real-time apps, servers.
2. Basic [Link] Modules
• Core modules provided by [Link].
• fs module – file handling.
• http module – creating web servers.
• path module – file and directory paths.
• os module – system information.
• url module – URL parsing.
3. Creating a Server using [Link]
• Using http module to create a server.
• Handling request and response objects.
• Setting headers and status codes.
• Serving text or HTML responses.
• Basic routing using if/else.
4. Why [Link] is Preferred over [Link]
• Simplifies server creation.
• Built-in routing system.
• Middleware support.
• Easier handling of requests and responses.
• Scalable and maintainable code.
• Industry-standard framework.