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 !filename.is\_a?(String) "No filename included in upload"else file\_path = ::File.join [Kemal.config.public\_folder, "uploads/", filename] File.open(file\_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 ๐Ÿ™

    Kemal.run do |config| server = config.server.not\_nil! server.bind\_tcp "127.0.0.1", 3000, reuse\_port: true server.bind\_tcp "0.0.0.0", 3001, reuse\_port: trueend