Snippets

Brian Medley Example Mojolicious mount

Created by Brian Medley last modified
#!/opt/perl

use Mojolicious::Lite;

app->log->level("debug");

plugin(AccessLog => {log => "/opt/vhost/log/access.log", format => '%h %l %u %t "%r" %>s %b %D "%{Referer}i" "%{User-Agent}i"'});

plugin Mount => {'*.bmedley.org' => '/opt/bmedley.org/bmedley.pl'};
plugin Mount => {'*.retrieveip.info' => '/opt/retrieveip_lite/retrieve.pl'};

my $listen = [];
push(@{ $listen }, "http://__IP__:80");
app->config(hypnotoad => {listen => $listen, workers => 4, user => "bpm", group => "bpm"});

app->secrets(["Yippie"]);

app->start;

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.