We are using Hanami 2.
We have both a not-slice component and a slice component in our codebase.
We would like to know how to boot only the not-slice component.
For example, even if our codebase contains both the not-slice component and the slice component, we want to boot only the not-slice component.
How can we achieve this?
We have tried setting HANAMI_SLICES=“” in the environment, but we encountered an error because even though our codebase has a slice component, the HANAMI_SLICES environment variable is empty.
module Bookshelf
class Routes < Hanami::Routes
scope "v1" do
use Rack::Auth::Basic
get "/page" do
"Some restricted content"
end
end
slice :admin, at: "/admin" do
use Rack::Auth::Basic
get "/books", to: "books.index"
end
end
end
export HANAMI_SLICES=
When we access /v1/page, we got the following error.(We don’t get the error just after booting my app.)