3 ms·
Of course it is =) # WebSocket echo service websocket '/echo' => sub { my $self = shift; $self->on(message => sub { my ($self, $msg) = @_;
by gizzlon 13y ago
Of course it is =)
# WebSocket echo service
websocket '/echo' => sub {
my $self = shift;
$self->on(message => sub {
my ($self, $msg) = @_;
$self->send("echo: $msg");
});
};
- kbenson 13y agoI said that in jest not because it's ridiculous, but because I wish it were true. I use Mojolicious and love it. My only complaint is that I started with Mojolicious::Lite way back in the beginning of the project, and I really needed to port to Mojolicious proper with a better source file layout quite a while back, but Mojolicious makes it too easy to throw in another lite-style route. At least the templates were easy enough to separate that I did it long ago.