Index
NAME
Lumberjack::Application::Index - serve up the web client page for Lumberjack::Application
SYNOPSIS
use Lumberjack::Application::Index;
my &app = Lumberjack::Application::Index.new(ws-url => 'socket');
# You could use any P6SGI container
HTTP::Server::Tiny.new(port => 8898).run(&app);
DESCRIPTION
This provides a P6SGI application that will serve up the client application
page for Lumberjack::Application
. The page contains the AngularJS
websocket client that will populate the page with the incoming messages.
The text of the page itself is rendered from a template that is located
in the resources of the distribution.
You can of course use a different page altogether if you are constructing the application yourself, and just use this code and/or the template as a starting point.
METHODS
method new
method new(:$ws-url!)
The constructor takes a single required parameter ws-url
which is the
path on which the websocket endpoint is located.