[Dancer-users] How to set the environment?
Joel Roth
joelz at pobox.com
Wed Dec 15 04:11:11 CET 2010
On Wed, Dec 15, 2010 at 12:44:14AM +0200, Gabor Szabo wrote:
> in the $appdir/environments subdir there are two yml files for
> configuration in development and production environment.
>
> How do I configure which environment is the application running in?
>
> I tried to find it in
> http://search.cpan.org/dist/Dancer/lib/Dancer/Config.pm
> but could not find it.
Hi Gabor,
You could pass it as a command-line argument.
$ myapp.pl --environment=production
But I put it right in the script:
BEGIN { push @ARGV, qw(--environment=production) }
Cheers,
Joel
> Gabor
> http://szabgab.com/
--
Joel Roth
More information about the Dancer-users
mailing list