i
Creating a Web Server
Handling Get Requests
Handling Post Requests
Event Handling
Event Loop
Routing
Streams
Debugging a Node application
Framework in Node.js
Express.js
Templating Engine
Invoking a REST Service
Pre-requisites for Node.js
Introduction to Node.js
What to use Node.js for?
Node.js - Environment Setup
REPL Terminal
Routing is navigation between different pages in an application.
To design an enterprise application, it needs to have well-defined routing architecture for code modularity, readability, and later on for smooth scalability as well.
If we need to navigate across different URLs based on the incoming request, we need to implement routing.
We can check the request object URLs to navigate the user to the desired pages.
Like for respective URLs, we want to redirect the user to the corresponding page.
routingDemo.js
Browser
Route : ‘/’
Route : /login
Route : ‘/register’
Route : ‘/contactUs’
In this approach, we are searching for a URL path using a comparison operator, which is not a good approach for enterprise applications having hundreds of different navigation paths.
In Enterprise applications, we use Frameworks, which we will discuss in Frameworks sections. Frameworks help to create applications faster.
Don't miss out!