[dancer-users] production.yml & development.yml

WK wanradt at gmail.com
Mon Jul 4 15:50:32 BST 2016


Hi!

2016-07-04 17:39 GMT+03:00 Wanjuan Yang <wy1 at sanger.ac.uk>:

> There are 2 environment config file in the dancer web framework.
>
> Where to set which environment file( development.ml or production.yml) is
> used?

It depends, how you deploy your app, but if you run wit default
development server,
http://search.cpan.org/dist/Dancer/lib/Dancer/Introduction.pod says:

"you can change the running environment using the --environment
command line switch"

>From http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod :

Another way is to set env variable:
    DANCER_ENVIRONMENT "production"

Or with plackup:

    plackup -E deployment -s Starman --workers=10 -p 5001 -a bin/app.pl

And while running with uwsgi, it assumes your environment is "uwsgi",
so you should have config file "uwsgi.yml".

-- 
Wbr
Kõike hääd,

Gunnar


More information about the dancer-users mailing list