Function to create a new route.
The path for the route.
The handler function for the route.
Optional
A new route object.
Function to create a new route.