Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    PGXN::API 0.16.2

    Download button

    No screenshots available
    Downloads: 52  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    David E. Wheeler | More programs
    Perl Artistic License / FREE
    February 15th, 2012, 01:35 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    PGXN::API description

    Maintain and serve a REST API to search PGXN mirrors

    PGXN is a CPAN-inspired network for distributing extensions for the PostgreSQL RDBMS. All of the infrastructure tools, however, have been designed to be used to create networks for distributing any kind of release distributions and for providing a lightweight static file JSON REST API.

    PGXN::API is a Perl module that provides a superset of the static file REST API, embellishing the metadata in some files and providing additional APIs, including full-text search and browsable access to all packages on the mirror. Hit the PGXN API server for the canonical deployment of this module. Better yet, read the comprehensive API documentation or use WWW::PGXN if you just want to use the API.

    There are two simple steps to setting up your own API server using this module:

    - pgxn_api_sync

     This script syncs to a PGXN mirror via rsync and processes newly-synced data to provide the additional data and APIs. Any PGXN mirror will do. If you need to create your own network of mirrors first, see PGXN::Manager. Consult the pgxn_api_sync documentation for details on its (minimal) options.

    - pgxn_api_server

     A Plack server for the API. In addition to the usual plackup options, it has a few of its own:

     --doc-root

     The path to use for the API document root. This is the same directory as you manage via pgxn_api_sync in a cron job. Optional. If not specified, it will default to a directory named www in the parent directory above the PGXN directory in which this module is installed. If you're running the API from a Git checkout, that should be fine. Otherwise you should probably specify a document root or you're you'll never be able to find it.

     --errors-to

     An email address to which error emails should be sent. In the event of an internal server error, the server will send an email to this address with diagnostic information.

     --errors-from

     An email address from which alert emails should be sent.

    And that's it. If you're interested in the internals of PGXN::API or in hacking on it, read on. Otherwise, just enjoy your own API server!

    Synopsis

    In a cron job:

     * * * * 42 pgxn_api_sync --root /var/www/api rsync://master.pgxn.org/pgxn/

    In a system start script:

     pgxn_api_server --doc-root /var/www/api \
     --errors-from oops@example.com \
     --errors-to alerts@example.com



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    REST API | PGXN mirrors | Perl module | Perl | PGXN | mirrors



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM