Kemal 0.21.0 released!
Kemal is a Fast, Effective, Simple web framework written in Crystal.
Kemal 0.21.0 is here This release brings long wanted features with more performance
A long wanted feature, allows one to use
ws declarations This would allow accessing named url parameters and query parameters in WebSocket routes.
For example consider having a WebSocket url like
Now you can access these variables from your url within your
ws "/:room_name" do |socket, env| env.params.url["room_name"] # => kemal env.params.query["username"] # => sdogruyol end
Customizable Static File Headers
Another long wanted feature, which adds support for customizing the headers of built-in
Kemal::StaticFileHandler Useful for single page applications which rely on
Here’s a quick snippet for allowing
static_headers do |response, filepath, filestat| if filepath =~ /\.js$/ response.headers.add("Access-Control-Allow-Origin", "*") end end end
Kemal is built for being fast, we take performance seriously. In recent benchmarks we discovered that Kemal is being blazing fast
However, that’s not a reason to stop us from getting faster This release brings %10-%15 performance increase in overall execution times.
Thanks for using and supporting Kemal. You can check the full CHANGELOG here.
P.S: You can support Kemal development via Patreon