Closed serjpetrenko closed 4 years ago
@serjpetrenko Hello, this isn't intended to be used like this. The invocation to .use
is meant to mount a Rack Middleware, not to plug in Ruby namespaces. You may want to use .mount
instead.
class App < Hanami::API
scope 'api' do
mount API::V1::Base.new, at: "/v1"
end
end
I will document this in README.
@jodosha Thanks for your comment.
Hi everyone,
How to correctly use namespace
/api/v1/
for example in Roda?I faced the problem of connecting my route using Rack Middleware it's from this section.
I use the next structure:
Gemfile
config.ru
Folder with file /api/v1/base.rb
I run the application with command
bundle exec rackup
then open the browser on the addresslocalhost:9292/api/v1/users
and have next issue