<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body style="font-family: DIN-Regular;" text="#000000"
bgcolor="#FFFFFF"><div style="font-family: DIN-Regular;"><div
class="moz-text-html" lang="x-unicode">
<div style="font-family: DIN-Regular;"><span style="font-family:
DIN-Regular;">Stefan,</span><br><br><span>Stefan
Hornburg (Racke) wrote:</span><br><blockquote
cite="mid:574549B1.40708@linuxia.de" type="cite"><div
class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-size: 13px;" lang="x-unicode"><pre wrap="">On 05/24/2016 05:50 PM, Warren Young wrote:
</pre><blockquote type="cite" style="color: #000000;"><pre wrap="">On May 24, 2016, at 7:50 AM, Jochen Schnuerle <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:js@betabox.de"><js@betabox.de></a> wrote:
</pre><blockquote type="cite" style="color: #000000;"><pre wrap="">But I don't unterstand.
</pre></blockquote><pre wrap="">I pointed you right at the code implementing the feature you’re trying to use. It’s quite straightforward Perl. If you don’t understand my prose description of what it does, you should certainly understand the Perl code.
</pre><blockquote type="cite" style="color: #000000;"><pre wrap="">I just want to move my config.yml in the sub dir /etc.
</pre></blockquote><pre wrap="">The feature you’re trying to use doesn’t allow that. You will either have to structure your project directory differently, or change Dancer to behave the way you prefer.
</pre></blockquote><pre wrap="">I suggest to look at the environment variables, which Dancer 2 uses:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Config.pod#Environment-variables">https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Config.pod#Environment-variables</a>
Especially DANCER_CONFDIR and DANCER_ENVDIR.
Regards
Racke
</pre></div></blockquote>That worked great!<br><br><br>After
configure the env vars:<br><br><span style="font-family: monospace;">export
DANCER_CONFDIR="/opt/fsi/portal/etc"</span><br style="font-family:
monospace;"><span style="font-family: monospace;">export
DANCER_ENVDIR="/opt/fsi/portal/etc"</span><br><br>Dancer2 search for the
"views" dir in<br><br><span style="font-family: monospace;">/opt/fsi/portal/etc/views</span><br><br>So
I add to the config.yml of my Dancer2 source:<br><br><span
style="font-family: monospace;">views: "/opt/fsi/portal/views"</span><br><br>and
remove the source lines in my fsi.pm:<br><br>#set
config_location => $dirs . '../etc';<br>#set
environments_location => $dirs . '../etc';<br>#set 'environment'
=> 'development';<br><br>and all works great, like I have it in my
Dancer1 source/tree.<br><br>Thank you very much!<br><br>Regards<br><br>
Jochen<br></div>
</div>
</div></body></html>