Browse Source

Set views to absolute path

To allow the app to run from multiple directories, set views to an
absolute path based on the Dancer2 internal appdir variable.
add-test-db-and-override
Blaine Motsinger 1 year ago
parent
commit
bf1c932145
  1. 1
      app/config.yml
  2. 6
      lib/Pasteburn.pm

1
app/config.yml

@ -10,4 +10,3 @@ engines:
is_http_only: 1
default_duration: 604800
with_request_address: 1
views: '../views'

6
lib/Pasteburn.pm

@ -19,6 +19,12 @@ BEGIN {
unless ( config->{engines}{session}{Cookie}{secret_key} ) {
die("FATAL: session Cookie secret_key is not set");
}
set views => config->{appdir} . 'views';
unless ( config->{views} ) {
die("FATAL: views is not set");
}
}
hook before => sub {

Loading…
Cancel
Save