Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: first steps with Mojolicious::Lite

by davido (Cardinal)
on Jun 17, 2020 at 16:47 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2024-04-18 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found