Discussion:
setting configuration from the command line
(too old to reply)
Cam
2018-09-16 17:48:33 UTC
Permalink
I have a Mojo server-side app and would like to automate an integration
test with the corresponding client (which is not in Perl). The data
source for the app is specificied on the 'my_app.conf' file and uses the
regular config plugin. Is there a standard way of overriding
configuration settings (or specifying and alternate config file) from
the command line so that I can programmatically open a local server
populated with test data and isolated from other prod/testing data?
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Jason Cooper
2018-09-17 07:06:44 UTC
Permalink
Hi,
Have you tried setting the `MOJO_CONFIG` environment variable to the name
of an alternative config file? Other useful environment variables for
Mojolicious are listed on the wiki -
https://github.com/mojolicious/mojo/wiki/%25ENV

Regards,
Jason.
Post by Cam
I have a Mojo server-side app and would like to automate an integration
test with the corresponding client (which is not in Perl). The data
source for the app is specificied on the 'my_app.conf' file and uses the
regular config plugin. Is there a standard way of overriding
configuration settings (or specifying and alternate config file) from
the command line so that I can programmatically open a local server
populated with test data and isolated from other prod/testing data?
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Cam
2018-09-17 12:31:16 UTC
Permalink
Post by Jason Cooper
Hi,
Have you tried setting the `MOJO_CONFIG` environment variable to the name
of an alternative config file? Other useful environment variables for
Mojolicious are listed on the wiki -
https://github.com/mojolicious/mojo/wiki/%25ENV
Regards,
Jason.
Post by Cam
I have a Mojo server-side app and would like to automate an integration
test with the corresponding client (which is not in Perl). The data
source for the app is specificied on the 'my_app.conf' file and uses the
regular config plugin. Is there a standard way of overriding
configuration settings (or specifying and alternate config file) from
the command line so that I can programmatically open a local server
populated with test data and isolated from other prod/testing data?
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
I'll try that. Thank you!
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
sri
2018-09-17 13:18:56 UTC
Permalink
I would use mode specific config files, like "my_app.testing.conf" and
start the
app with "./my_app.pl daemon --mode testing".

--
sebastian
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Cam
2018-09-17 14:17:48 UTC
Permalink
Post by sri
I would use mode specific config files, like "my_app.testing.conf" and
start the
app with "./my_app.pl daemon --mode testing".
--
sebastian
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
That's an even better suggestion. I'll try it out. Thanks, Sri.
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Cam
2018-09-17 18:49:28 UTC
Permalink
Post by sri
I would use mode specific config files, like "my_app.testing.conf" and
start the
app with "./my_app.pl daemon --mode testing".
--
sebastian
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Worked like a charm. Thanks again!
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
Loading...