Example - An example RPC-application for Dancer2::Plugin::RPC
$ cd example $ carton install $ APP_PORT=3030 carton exec -- bin/example.pl start $ carton exec -- bin/do-rpc -u http://localhost:3030/system -c status -t xmlrpc $ carton exec -- bin/example.pl stop
This example application shows a way to use the Dancer2::Plugin::RPC system.
As the Example::API::System module shows, one can use the special POD-directives =for <plugin-keyword> <rpc-name> <sub-name> [<path>] to publish access to the API.
=for <plugin-keyword> <rpc-name> <sub-name> [<path>]
The code and the POD must be in the .pm-file.
.pm
As the Example::API::MetaCpan module shows, one can also use the config.yml file to set up the access to the API.
config.yml
© MMXXII - Abe Timmerman <abeltje@cpan.org>
To install Dancer2::Plugin::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Plugin::RPC
CPAN shell
perl -MCPAN -e shell install Dancer2::Plugin::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.