There are two definitions for routers on the web:
- For the network layer, the router is a networking device that decides data Packets directions. They are distributed by retailers allowing user interaction to the internet.
- For SPA in application layer, router is a library that decides what web page is presented by a given URL. This middleware module is used for all URL functions, as these are given a path to a file that is rendered to open the next page.
Learn More
General knowledge
For network layer context:
- Router (computing) on Wikipedia
For SPA in application layer context, most of the popular SPA frameworks has its routing library: