sdogruyol on master
Do not try to call ExceptionHan… Merge pull request #515 from ke… (compare)
Unable to satisfy the following requirements: - `crystal (>= 0.36.0)` required by `kemal 1.0.0` - `crystal (~> 0.35, >= 0.35.0)` required by `cryomongo 0.3.3+git.commit.d2e1f31fdf879c26aaf961eda2cb55dfa3f69f0a` - `crystal (>= 0.35.0)` required by `radix 0.4.1` - `crystal (< 2.0.0)` required by `kilt 0.4.1` - `crystal (~> 0.33, >= 0.33.0)` required by `exception_page 0.1.4` - `crystal (~> 0.35, >= 0.35.0)` required by `bson 0.3.0` Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.
Hi all, I know that Kemal handlers are resolved to the top-level, so placing them in classes with instance variable access is not possible, e.g:
class HelloHandler def initialize(msg : String) @msg = msg end get "/" do |env| @msg end end
I've also looked at
Kemal.config.handlers but the
call method only seems to work as a passthrough for middleware chaining. Does Kemal have much in the way of modular support?
module SomethingApi def self.setup(service) get "/" do |env| service.do_something "something" end end end