put the routing logic for date in the server