I don't have an answer for you, but I recommend checking out this related
talk, Mojolicious Gardening by Joel Berger
<https://www.youtube.com/watch?v=ycAXeOKLCGc>.

He has a sample lite-hybrid app
<https://github.com/jberger/MojoliciousGardening/blob/master/ex/lite-hybrid/pushpin.pl>
.

On Mon, Apr 29, 2019 at 1:15 PM Viktor Nacht <[email protected]> wrote:

> I have a fairly simple Mojo app where I just want to spin off the admin
> routes into a module but still use the Mojolicious::Lite syntax. I
> understand I could "grow" the app, but that would add a lot of extra files
> where I really just need to add one file.
>
> Is something like this possible? I tried the "obvious" approach but no
> luck.
>
> use Mojolicious::Lite;
> use MyApp::Admin;
>
> get '/public'
>
> app->start;
>
> package MyApp::Admin;
>
> use Mojolicious::Lite;
>
> get '/admin';
>
> The route /admin isn't added even though the module is found and processed
> (using FindBin). Any thoughts?
>
> Thank you!
>
> V
>
> --
> 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.

Reply via email to