Skip to content

Commit

Permalink
Example configs for Mojolicious
Browse files Browse the repository at this point in the history
  • Loading branch information
kensanata committed Jun 10, 2019
1 parent 4e4d8ee commit b89c8b9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
4 changes: 4 additions & 0 deletions stuff/hypnotoad.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
use Mojo::Server::Hypnotoad;
warn "Use hypnotoad -s stuff/hypnotoad.pl to stop the server\n";
my $hypnotoad = Mojo::Server::Hypnotoad->new;
$hypnotoad->run('stuff/mojolicious-app.pl');
17 changes: 17 additions & 0 deletions stuff/mojolicious-app.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# From the root directory, run one of the following:
# 1. stuff/mojolicious-app.pl daemon -l http://localhost:8080
# 2. stuff/hypnotoad.pl
# 3. stuff/toadfarm.pl start

use Mojolicious::Lite;

plugin CGI => {
support_semicolon_in_query_string => 1,
};

plugin CGI => {
route => '/',
script => 'wiki.pl',
};

app->start;
8 changes: 8 additions & 0 deletions stuff/toadfarm.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use Toadfarm -init;

mount "stuff/mojolicious-app.pl" => {
"Host" => qr{^localhost:8080$},
mount_point => '/',
};

start;
2 changes: 1 addition & 1 deletion wiki.pl
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/perl
#! /usr/bin/env perl
# Copyright (C) 2001-2019
# Alex Schroeder <alex@gnu.org>
# Copyright (C) 2014-2015
Expand Down

0 comments on commit b89c8b9

Please sign in to comment.