Skip to content

bodo-hugo-barwich/plack-pwa-api

Repository files navigation

NAME

Plack Twiggy Product REST API

DESCRIPTION

This service provides the Product Data as REST API for the Plack Twiggy PWA Project.

To learn more about the Plack Twiggy PWA Project please visit: Plack Twiggy PWA

The running Version is hosted on Glitch at: Plack Twiggy Product REST API

REQUIREMENTS

To rebuild this web site the Minimum Requirements are to have Perl and cpanminus installed. The site uses the libraries Plack, Twiggy and JSON. The Twiggy Web Server requires the AnyEvent library. The Server Responses are provided completely as JSON documents. The API Data Structures are implemented with the Moose library for OO-Design.

INSTALLATION

  • cpanminus

    The cpanm Script will install the dependencies on local user level as they are found in the cpanfile. To run the installation call the cpanm Command within the project directory:

          cpanm -vn --installdeps .
    

EXECUTION

  • plackup

    The Site can be launched using the plackup Script as seen in the package.json. To launch the Site call the plackup Command within the project directory:

          plackup --server Twiggy --port 3000 scripts/web.psgi
    

IMPLEMENTATION

  • AnyEvent::Future

    To not block the server main thread too long and to enable asynchronous request processing the AnyEvent feature of Twiggy as AnyEvent::Future is used. Each Product Data Request produces a future that the Product Data Factory manages to build a complete Product Data List

Releases

No releases published

Packages

 
 
 

Languages