Use generic conf
Change-Id: I94d5579664100a41aa6aa4e8d77961294484f881
diff --git a/.gitignore b/.gitignore
index 387feae..d90dc7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
node_modules
cache/data
public
+kalamar.*.conf
script/hypnotoad.pid
.sass-cache
dev/css
diff --git a/kalamar.conf b/kalamar.conf
index 83fad8d..9bb2415 100644
--- a/kalamar.conf
+++ b/kalamar.conf
@@ -1,18 +1,19 @@
-# my api => 'http://10.0.10.51:7070/api/v0.1/'
-# my $api = 'http://10.0.10.13:7070/api/v0.1/';
-# my $api = 'http://localhost:9999/api/v0.1/';
-# my $api = 'http://10.0.2.40:8089/api/v0.1/';
-my $api = 'http://10.0.10.52:8899/api/v0.1/';
+my $api = 'http://localhost:9999/api/v0.1/';
{
Search => {
engine => 'Kalamar::API',
- # IDS Kustvakt server:
+ # Kustvakt server:
api => $ENV{'KALAMAR_API'} // $api
},
Kalamar => {
api => $ENV{'KALAMAR_API'} // $api,
auth_support => 0
},
+ # Doesn't make much sense when published, but who cares ...
+ 'TagHelpers-MailToChiffre' => {
+ method_name => 'PArok',
+ pattern_rotate => 673
+ },
CHI => {
default => {
driver => 'FastMmap',
@@ -32,21 +33,5 @@
max_key_length => 64,
max_size => '500m'
}
- },
- hypnotoad => {
- listen => ['http://*:6666', 'http://*:5555'],
- workers => 5,
- inactivity_timeout => 120,
- proxy => 1
- },
- MailException => {
- from => join('@', 'korap', 'ids-mannheim.de'),
- to => join('@', 'korap', 'ids-mannheim.de'),
- subject => '[KorAP] Kalamar crashed'
- },
- # Doesn't make much sense when published, but who cares ...
- 'TagHelpers-MailToChiffre' => {
- method_name => 'PArok',
- pattern_rotate => 673
}
}
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index b324be5..cbf4198 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -119,9 +119,9 @@
# Configure mail exception
- $self->plugin('MailException' => $self->config('MailException'));
-
-
+ if ($self->config('MailException')) {
+ $self->plugin('MailException' => $self->config('MailException'));
+ };
# Configure documentation navigation
my $navi = Mojo::File->new($self->home->child('templates','doc','navigation.json'))->slurp;