kemal v0.24.0 Release Notes

Release Date: 2018-08-14 // over 3 years ago

    ๐Ÿ‘ Crystal 0.26.0 support

    [breaking change] Removed env.params.files. You can use Crystal's built-in HTTP::FormData.parse instead

    post "/upload" do |env| HTTP::FormData.parse(env.request) do |upload| filename = file.filename if !\_a?(String) "No filename included in upload"else file\_path = ::File.join [Kemal.config.public\_folder, "uploads/", filename]\_path, "w") do |f| IO.copy(file.tmpfile, f) end"Upload OK"endend
    • [breaking change] From now on to access dynamic url params in a WebSocket route you have to use:

      ws "/:id" do |socket, context| id = context.ws_route_lookup.params["id"]end

    [breaking change] Removed _method magic param.

    โž• Added new exception page #466. Thanks @mamantoha ๐Ÿ™

    ๐Ÿ‘Œ Support custom port binding. Thanks @straight-shoota ๐Ÿ™ do |config| server = config.server.not\_nil! server.bind\_tcp "", 3000, reuse\_port: true server.bind\_tcp "", 3001, reuse\_port: trueend