Routing in Express Js

Routing refers to the way the server responds to the client’s request. There can be different routes for different http methods like get, post, etc. Routing is basically the type of response the client will get back. For example if we are trying to access the login page, then the server will respond with a login page in response or if we are trying to access a page for which we don’t have rights, then the server will throw an error.

A simple routing program

Passing parameters in URL

URL
Output

Leave a Reply

Your email address will not be published. Required fields are marked *