NAME

RPC::ExtDirect::Server - CGI-based Ext.Direct server

SYNOPSIS

use RPC::ExtDirect::Server;

my $server = RPC::ExtDirect::Server->new(static_dir => 'htdocs');
my $port   = $server->port;

print "Ext.Direct server is running on port $port\n";

$server->run();

DESCRIPTION

This module implements a minimal Ext.Direct capable server in pure Perl. Its main purpose it to be used as lightweight drop-in replacement for more complex production environments like Plack or Apache/mod_perl, i.e. for testing and mockups. It can also be used as the basis for production application servers when feature richness is not a requirement, or when resource consumption is of primary concern.

METHODS

new(%params)

Create a new server instance with specified parameters:

host

Hostname or IP address to bind to. Defaults to 127.0.0.1.

port

Port to bind to. Defaults to randomly generated in 30000-40000 range.

static_dir

Path to directory with static content. This parameter is mandatory.

run

Run the server. This method never returns.

DEPENDENCIES

RPC::ExtDirect::Server depends on the following modules: CGI::ExtDirect, RPC::ExtDirect, JSON, Attribute::Handlers.

SEE ALSO

For more information, see CGI::ExtDirect.

BUGS AND LIMITATIONS

There are no known bugs in this module. Use github tracker to report bugs (the best way) or just drop me an e-mail. Patches are welcome.

AUTHOR

Alexander Tokarev <tokarev@cpan.org>

ACKNOWLEDGEMENTS

I would like to thank IntelliSurvey, Inc for sponsoring my work on this module.

COPYRIGHT AND LICENSE

Copyright (c) 2012 Alexander Tokarev.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.