pinto-server - provide a web interface to a Pinto repository
version 0.036
pinto-server --root=/path/to/repository [--daemon] [--port=N]
Before running pinto-server you must first create a Pinto repository. See pinto-admin for instructions on that.
pinto-server
pinto-server provides a web API to a Pinto repository. Remote clients (like pinto-remote) can use this API to add distributions, remove packages, and list the contents of the Pinto repository. In addition, pinto-server serves up the contents of your repository, so you can use it as the source of distributions for cpan or cpanm.
The path to the root directory of the Pinto repository you wish to serve.
Indicates the an option describing the authentication scheme to use (default is no authentication). Each time this is used, a key=value pair must follow; one of them must be 'backend', which should correspond to a class in the Authen::Simple namespace, e.g. backend=Kerberos would indicate that Kerberos authentication will be used, with the Authen::Simple::Kerberos backend.
Options that follow will be passed as-is to the authentication backend.
For example, this would be a valid configuration for Kerberos:
--auth backend=Kerberos --auth realm=REALM.COMPANY.COM
and this is how the authentication backend will be constructed:
my $auth = Authen::Simple::Kerberos->new( realm => 'REALM.COMPANY.COM' );
All other options supported by plackup are supported too, such as --server, --port, --daemonize, etc. These will be passed to Plack::Runner.
--server
--port
--daemonize
pinto-server is PSGI compatible, running under Plack::Runner by default. It will use whatever backend you specify on the command line or have configured in your environment.
If you wish to add your own middleware and/or customize the backend in other ways, you can use Pinto::Server in a custom .psgi script like this:
# my-pinto-server.psgi my %opts = (...); my $server = Pinto::Server->new(%opts); my $app = $server->to_app(); # wrap $app with middlewares here and/or # insert code customized for your backend # which operates on the $app
Then you may directly launch my-pinto-server.psgi using plackup.
If you are running pinto-server and have configured Pinto to use a VCS-based store, such as Pinto::Store::VCS::Svn or Pinto::Store::VCS::Git, then you must not mess with the VCS directly (at least not the part of the VCS that holds the Pinto repository). This is because pinto-server only initializes the working copy of the repository at startup. Thereafter, it assumes that it is the only actor affecting the Pinto repository within the VCS. If you start modifying Pinto's area of the VCS directly, then the working copy for pinto-server will become out of date and conflicts will happen.
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
This software is copyright (c) 2011 by Imaginative Software Systems.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Pinto::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pinto::Server
CPAN shell
perl -MCPAN -e shell install Pinto::Server
For more information on module installation, please visit the detailed CPAN module installation guide.