Basic routing and middleware for Ruby