Hello,

I have created a webportal for my server installation and configuration functions with Dancer1. Now I want to add ldap user support and I think this is the opportunity to migrate to Dancer2.

First I created a webapp with

dancer2 gen -a "fsi" -p /opt/test/

After that I move the environment and config yml files to the etc dir and delete the environments dir. I want a clean root dir and so I move the rest of the files to the new doc dir.

[root@fsisrv6 fsi]# pwd
/opt/test/fsi
[root@fsisrv6 fsi]# tree
.
??? bin
?   ??? app.psgi
??? doc
?   ??? cpanfile
?   ??? Makefile.PL
?   ??? MANIFEST
?   ??? MANIFEST.SKIP
??? etc
?   ??? config.yml
?   ??? development.yml
?   ??? production.yml
??? lib
?   ??? fsi.pm
??? public
?   ??? 404.html
?   ??? 500.html
?   ??? css
?   ?   ??? error.css
?   ?   ??? style.css
?   ??? dispatch.cgi
?   ??? dispatch.fcgi
?   ??? favicon.ico
?   ??? images
?   ?   ??? perldancer-bg.jpg
?   ?   ??? perldancer.jpg
?   ??? javascripts
?       ??? jquery.js
??? t
?   ??? 001_base.t
?   ??? 002_index_route.t
??? views
    ??? index.tt
    ??? layouts
        ??? main.tt

From my Dancer1 project, I copy the three set lines to the fsi.pm file:

- - --- -- --- --  - ----
package fsi;
use Dancer2;

set confdir          => "/opt/test/fsi/etc";
set envdir           => "/opt/test/fsi/etc";
set environment      => 'development';

our $VERSION = '0.1';

get '/' => sub {
    template 'index';
};

true;
- - --- -- --- --  - ----

If I now start the portal with

plackup -s Starman --workers=10 -a /opt/test/fsi/bin/app.psgi -p 3000

I see in the "Your application's environment" section:

   Location: /opt/test/fsi
    Template engine: <% settings.template %>
    Logger: <% settings.logger %>
    Environment: <% settings.environment %>

So I think Dancer2 cannot find the config.yml file. I read that I must create a .dancer file in the etc dir:

[root@fsisrv6 etc]# ls -lisa
insgesamt 20
5376363 4 drwxr-xr-x 2 root root 4096 19. Mai 07:52 .
5376297 4 drwxr-xr-x 9 root root 4096 19. Mai 07:51 ..
5376359 4 -rw-r--r-- 1 root root 1414 19. Mai 07:52 config.yml
5376327 0 -rw-r--r-- 1 root root    0 19. Mai 07:49 .dancer
5376361 4 -rw-r--r-- 1 root root  727 19. Mai 07:49 development.yml
5376352 4 -rw-r--r-- 1 root root  302 19. Mai 07:49 production.yml

But that does not work. What am I doing wrong? Who can help, please?

Thank you & Regards
    Jochen


PS:
env infos:
 - CentOS 6 and 7
 - Dancer2 0.166001


_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to