Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: first steps with Mojolicious::Lite

by davido (Cardinal)
on Jun 17, 2020 at 16:47 UTC ( #11118211=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    use Mojolicious::Lite;
    ...
    get '/_live' => sub { shift->render( json => { alive_since => (time - 
    +$startup) } ) };
    
    app->start;
    
  2. or download this
    #!/usr/bin/env perl
    
    ...
        ->json_is({success => 1, code => 200, message => 'OK'});
    
    done_testing();
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118211]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2021-10-17 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (70 votes). Check out past polls.

    Notices?