diff options
| author | Darkelarious <darkelarious@333networks.com> | 2017-09-25 23:13:47 +0200 |
|---|---|---|
| committer | Darkelarious <darkelarious@333networks.com> | 2017-09-25 23:13:47 +0200 |
| commit | 18921404e5454cdf202b7b4f70a2777f3e297998 (patch) | |
| tree | d24abef8f510998423cb8f107228e253ee6b4825 /util | |
| download | WebInterface-Perl-MS-Perl-18921404e5454cdf202b7b4f70a2777f3e297998.tar.gz WebInterface-Perl-MS-Perl-18921404e5454cdf202b7b4f70a2777f3e297998.zip | |
Web interface for MasterServer-Perl
Diffstat (limited to 'util')
| -rwxr-xr-x | util/masterwebinterface.pl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/util/masterwebinterface.pl b/util/masterwebinterface.pl new file mode 100755 index 0000000..7abee70 --- /dev/null +++ b/util/masterwebinterface.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl +package MasterWebInterface; +use strict; +use warnings; +use Cwd 'abs_path'; + +our $ROOT; +BEGIN { ($ROOT = abs_path $0) =~ s{/util/masterwebinterface.pl$}{}; } +use lib $ROOT.'/lib'; +use TUWF; + +our(%O, %S, @login); +require "$ROOT/data/webinterface-config.pl"; + +#add %S from web-config.pl to OBJ +$TUWF::OBJ->{$_} = $S{$_} for (keys %S); + +# TUWF options +TUWF::set( + logfile => "$ROOT/log/MasterWebInterface-TUWF.log", + mail_from => '<noreply@333networks.com>', + db_login => ['dbi:Pg:dbname=devmasterserver', 'unrealmaster', 'unrealmasterpassword'], + validate_templates => { # input templates + page => { template => 'uint', max => 1000 }, + }, + xml_pretty => 0, + log_queries => 1, + debug => 1, +); + +# load master page libs +TUWF::load_recursive('MasterWebInterface::Handler', + 'MasterWebInterface::Util', + 'MasterWebInterface::Database::Pg', + #'MasterWebInterface::Database::sqlite', + ); # Do not forget to choose the database type here! +#and let's roll! +TUWF::run(); |
