Plack Twiggy Product REST API
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
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.
-
cpanminus
The
cpanm
Script will install the dependencies on local user level as they are found in thecpanfile
. To run the installation call thecpanm
Command within the project directory:cpanm -vn --installdeps .
-
plackup
The Site can be launched using the
plackup
Script as seen in thepackage.json
. To launch the Site call theplackup
Command within the project directory:plackup --server Twiggy --port 3000 scripts/web.psgi
-
AnyEvent::Future
To not block the server main thread too long and to enable asynchronous request processing the
AnyEvent
feature ofTwiggy
asAnyEvent::Future
is used. Each Product Data Request produces a future that the Product Data Factory manages to build a complete Product Data List