A routing middleware for Tie