I don't know the first thing about PSGI, but Nginx Unit sounds really interesting! Thanks for bringing it up!
Try this from the cookbook Plack middleware <https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Plack-middleware> and PSGI/Plack <https://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#PSGI-Plack>? use Mojolicious::Lite;use Plack::Builder; get '/welcome' => sub { my $c = shift; $c->render(text => 'Hello Mojo!');}; builder { enable 'Deflater'; app->start;}; On Wed, Jan 23, 2019 at 9:48 AM Alex Povolotsky <[email protected]> wrote: > Hello > > There is an app server, from nginx creators, named unit ( > https://unit.nginx.org/). It supports Perl via PSGI, but fails with > Mojolicious::Lite app. > > 2019/01/23 09:41:23.029 [error] 26579#26579 [unit] #4: PSGI: Failed to run > Perl Application: > Undefined subroutine &main::1 called. > > plack run the same app without problem, actually, I've tested a bare > minimum one > > === > #!/usr/bin/env perl > use Mojolicious::Lite; > get '/' => sub { > my $c = shift; > $c->render(text=>'hello'); > }; > > app->start; > === > > Basic Plack code runs ok. > > I don't have any idea on tracing that error, maybe someone could help? > > Alex > > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
