1#!/usr/bin/perl
2use strict;
3
4use lib qw( lib );
5
6use Gantry qw{ -Engine=CGI -TemplateEngine=TT };
7
8use Gantry::Server;
9use Gantry::Engine::CGI;
10
11my $cgi = Gantry::Engine::CGI->new( {
12    config => {
13        auth_dbconn => 'dbi:SQLite:dbname=docs/auth.sqlite.db',
14        auth_dbuser => '',
15        template_wrapper => 'gantry_wrapper.tt',
16        app_name => 'Auth',
17        root => 'root/moxie:root',
18    },
19    locations => {
20        '/users'    => 'Gantry::Control::C::Users',
21        '/groups'   => 'Gantry::Control::C::Groups',
22        '/pages'    => 'Gantry::Control::C::Pages',
23    },
24} );
25
26my $port = shift || 8080;
27
28my $server = Gantry::Server->new( $port );
29$server->set_engine_object( $cgi );
30
31print STDERR "Available urls:\n";
32foreach my $k ( keys %{ $cgi->{locations}     } ) {
33    print STDERR  "  http://localhost:${port}$k\n";
34}
35print STDERR "\n";
36
37$server->run();
38