Mojolicious

Mojolicious is a web framework with a native PSGI interface which is easy to build and run on Helion Stackato.

A simple app using the Mojolicious framework needs four files:

  1. app.psgi
  2. app.pl
  3. requirements.txt
  4. manifest.yml

In the requirements.txt file, list any module requirements, with at least the following:

Mojolicious

In the app.psgi file, for a simple implementation:

$ENV{MOJO_MODE} = 'production';
require 'app.pl';

The app.pl file contains the core functionality:

use Mojolicious::Lite;

# Simple response to display Environment Variables.
get '/' => sub {
      my $self = shift;
      $self->render_text(join("<br>", map "$_=$ENV{$_}", sort keys %ENV));
};

app->start;

The manifest.yml file contains deployment instructions for Helion Stackato. See complete details for this file in the Manifest.yml Options section.

Examples