Introduction
Route prefixing helps organize your web app by grouping similar routes under a shared starting path. It keeps your code tidy and easier to manage.
When you want to group all user-related routes under '/users' like '/users/login' and '/users/register'.
When building an API and you want all version 1 routes to start with '/api/v1'.
When you have admin routes and want them all to start with '/admin' for clarity and security.
When splitting routes into separate files but want them to share a common path prefix.
When you want to apply middleware only to a group of routes sharing the same prefix.