Skip to content

Instantly share code, notes, and snippets.

@jadeallenx
Last active August 29, 2015 14:03
Show Gist options
  • Save jadeallenx/44a415c302139af78dde to your computer and use it in GitHub Desktop.
Save jadeallenx/44a415c302139af78dde to your computer and use it in GitHub Desktop.
use Mojolicious::Lite;
use Games::Dice qw(roll);
post '/' => sub {
my $self = shift;
my $dicespec = $self->param('roll');
my $result = roll($dicespec);
$self->render(text => "$dicespec: $result\n");
};
app->start;
from fedora
maintainer Mark Allen <mrallen1@yahoo.com>
run yum -y install perl-Mojolicious
run yum -y cpanminus
run cpanm Games::Dice
run yum install -y git
run git clone https://gist.github.com/mrallen1/44a415c302139af78dde
cmd ["morbo", "44a415c302139af78dde/dice.pl", "&"]
expose 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment