Matthias Bloch > MojoX-Dispatcher-Qooxdoo-Jsonrpc > Mojolicious::Plugin::QooxdooJsonrpc

Download:
MojoX-Dispatcher-Qooxdoo-Jsonrpc-0.89.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.89   Source   Latest Release: MojoX-Dispatcher-Qooxdoo-Jsonrpc-0.95

NAME ^

Mojolicious::Plugin::QooxdooJsonrpc - handle qooxdoo Jsonrpc requests

SYNOPSIS ^

 # lib/your-application.pm

 use base 'Mojolicious';
 use RpcService;
 
 sub startup {
    my $self = shift;
       
    $self->plugin('qooxdoo_json_rpc',{
        prefix => '/',
        path => 'jsonrpc',
        services => {
            Test => RpcService->new(),
        },
    });
 }

DESCRIPTION ^

This plugin installs the MojoX::Dispatcher::Qooxdoo::Jsonrpc dispatcher into your application. The result of your build run is expected in the public/ directory of your mojo app.

See the documentation on MojoX::Dispatcher::Qooxdoo::Jsonrpc for details on how to write your service.

The plugin understands the following parameters.

prefix

By default the plugin will add its routes starting at the root / by setting a prefix you can move them down the tree.

services (mandatory)

A pointer to a hash of service instances. See MojoX::Dispatcher::Qooxdoo::Jsonrpc for details on how to write a service.

path (default: jsonrpc)

If your application expects the JsonRPC service to appear under a different url.

Source Mode

While developing your qooxdoo application it is handy to run its souce version. Normally this is done directly from the file system, but in that mode your application will not be able to call back to the server with POST requests.

This module provides a qooxdoo source mode where it will serve the source version of your application. Set the QX_SRC_MODE environment variable to "1" to activate the source mode. By default, the module expects to find the source of your application in MOJO_HOME/../frontend/source if you keep the source somewhere else you can set the alternate location via QX_SRC_PATH either absolute or relative to the MOJO_HOME directory.

In production mode, the plugin expects to find the result of your generate.py build run in mojos public directory.

AUTHOR ^

Tobias Oetiker, <tobi@oetiker.ch>

COPYRIGHT ^

Copyright OETIKER+PARTNER AG 2010

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: