express.Router([options])

Creates a new router object.

var router = express.Router([options]);

The optional options parameter specifies the behavior of the router.

PropertyDescriptionDefaultAvailability
caseSensitiveEnable case sensitivity.Disabled by default, treating “/Foo” and “/foo” as the same.
mergeParamsPreserve the req.params values from the parent router. If the parent and the child have conflicting param names, the child’s value take precedence.false4.5.0+
strictEnable strict routing.Disabled by default, “/foo” and “/foo/” are treated the same by the router. 

You can add middleware and HTTP method routes (such as get, put, post, and so on) to router just like an application.

For more information, see Router.