Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Pyara
@Nbotz
nevermind, i got it. just had to use crystal to calculate the time
Ed
@drum445
Yeah, taht's what I would do, you don't even need websockets really
Pyara
@Nbotz
One problem i have is when i have multiple videos, the sync is off because it doesn't reset the time difference after the video ends, but i dont know how to automatically calculate the duration of each video in the folder and reset the counter after the video ends
is there a way for crystal to do it? JS can find the duration and time of a video, but i dont know how to send that data back to crystal, and i dont know how to keep the initial time synced with JS
D. Scott Boggs
@dscottboggs_gitlab
@Nbotz if your project is open-source, I'd be very interested in contributing to it. I got started on a project like that a while back and only set it aside because I didn't have the time to work on it. I've made a video-streaming service with Kemal before and could probably ease you through a few pain-points. Feel free to PM me, I don't usually keep notifications on for this channel
D. Scott Boggs
@dscottboggs_gitlab
I don't seem to be able to get Kemal to work with a specific set of routes. This is a semi-minimal example which shows the issue. The routes on lines 94, 98-103, and 108 are the ones which are not working. I suspected an issue with the Radix tree having conflits (originally lines 108 and 109 were "put", "/dppmrestapi/actions/app/:package_name" and "delete", "/dppmrestapi/actions/app/:app_name", which would have obviously conflicted if the tree had no knowlege of route)... however, after changing that and other potential conflicts, the issue still remains. Any guidance would be appreciated, thank you
D. Scott Boggs
@dscottboggs_gitlab

I meant

the tree had no knowlege of verb

Julien Reichardt
@j8r
maybe, have the same :something?
D. Scott Boggs
@dscottboggs_gitlab
I'll try it, what's the harm
Julien Reichardt
@j8r
:/
D. Scott Boggs
@dscottboggs_gitlab
um
I think that worked?
yeah holy crap, I can't believe that was it...
Julien Reichardt
@j8r
:)
too bag this error is mystic, and not catched at compile-time
Bajro
@bajro17
Congratulation to Kemal with all things inside fast almost like pure router.cr :) https://github.com/the-benchmarker/web-frameworks
Azzuwan Aziz
@azzuwan
Guys any recommended JWT lib to use with Kemal?
Jordano Moscoso
@PlayLights_twitter
What about default from crystal community?
D. Scott Boggs
@dscottboggs_gitlab
comes with a javascript companion, so you can just do login(username, password) on the client, then every authFetch call will take care of hooking it in.
Azzuwan Aziz
@azzuwan
Thank you guys that was quick!
D. Scott Boggs
@dscottboggs_gitlab
np! :)
Julien Reichardt
@j8r
@sdogruyol could the kemal site be in https, please :)?
Serdar Dogruyol
@sdogruyol
@j8r it already is https://kemalcr.com/
yet it leads to http by default..not sure how to configure that from GH pages
Julien Reichardt
@j8r
nice! There are still references here and there to the http site, like https://github.com/kemalcr/kemal
@sdogruyol you have to tick Enforce HTTPS
Serdar Dogruyol
@sdogruyol
gotcha
Serdar Dogruyol
@sdogruyol
@j8r done :tada:
Julien Reichardt
@j8r
@sdogruyol great :heart:
Ed
@drum445
:+1:
x-leopold
@crud-boy
kemalcr/kemal#541 Server automatic shutdown
MalachiM
@Malachi-M
Hey all. I am new to crystal and Kemal. I haven’t been able to find the documentation on how to delete a cookie in Kemal. Any reference would be appreciated.
D. Scott Boggs
@dscottboggs_gitlab
where "context" is the block argument like get "/" do |context|
MalachiM
@Malachi-M
Awesome thanks!
Victor Afanasev
@vifreefly
Hello everyone! I have a question: can I provide a default layout for a kemal application, so I don't have to pass it every time as a second argument for render method?
D. Scott Boggs
@dscottboggs_gitlab
No, but you could create a custom method which calls render with that default argument every time. like instead of render "something", default, render_default "something" idk if that helps
Using Layouts
Victor Afanasev
@vifreefly
Okay, thanks, using macro for a custom rendererer with predefined values is a way to go
Bajro
@bajro17
Kemal websocket dont work :(
It look something wrong with libevent
Jonathan
@greenbigfrog
@bajro17 what exactly is your issue?
Azzuwan Aziz
@azzuwan
Hi guys, just wondering is there anything like attribute or annotation in crystal that we can use in kemal routes. I am trying to mimic ASP.NET Core Role based authorization
Azzuwan Aziz
@azzuwan
Alternatively, how do I make role based authorization work with JWT middleware. I know I can create a middleware that checks for routes against the role in the JWT payload but what is the recommended way for Kemal?
Julien Reichardt
@j8r
@dscottboggs_gitlab has knowledge about this, he may help you
Jonathan Silverman
@mixflame
Hi
How do I send from a websocket inside a controller action?
Jonathan Silverman
@mixflame
Kemal is the only leader I'll ever need