Mojolicious-Plugin-Nour-Database
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/Nour/Database.pm view on Meta::CPAN
./config/database/private/production.yml
./config/database/private/README.md
./config/database/config.yml
The only real file you need is C<./config/database/config.yml>.
Overriding configuration in the "private" sub-directory e.g. C<./config/database/private/> is just
a neat feature which let's you override the entire config or just a single nested key/value
that was imported from the "public" configuration i.e. C<./config/database/config.yml>. Why is this useful?
You can `echo '*private*' >> .gitignore` and ensure that your passwords or sensitive tokens or what not don't
get exposed in your public git repository.
=head2 CONFIGURATION EXAMPLES
Here's a couple examples of what C<./config/database/config.yml> might look like:
=over 2
=item Postgresql
---
development:
dsn: dbi:Pg:dbname=foo;host=bar
username: foobar
password: barbaz
production:
dsn: dbi:Pg:dbname=bar
default:
database: production
username: barfoo
password: baroo
option:
AutoCommit: 1
RaiseError: 1
PrintError: 1
pg_bool_tf: 0
pg_enable_utf8: 1
=item MySQL
---
development:
dsn: dbi:mysql:database=app_dev;host=10.0.1.99
production:
dsn: dbi:mysql:database=app_prod;host=10.0.1.99
production_with_drop_priv:
dsn: dbi:mysql:database=app_prod;host=10.0.1.99
username: drop
password: drop
otherdb:
dsn: dbi:mysql:database=dbfoo;host=otherhost
option:
AutoCommit: 0
default:
database: production
username: ding
password: dong
option:
AutoCommit: 1
RaiseError: 1
PrintError: 1
mysql_enable_utf8: 1
mysql_auto_reconnect: 1
=back
=head1 SEE ALSO
=over 2
=item L<Nour::Config>
=item L<Nour::Database>
=item L<DBIx::Simple>
=item L<Mojolicious::Plugin::Nour::Config>
=back
=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<https://github.com/sharabash/mojolicious-plugin-nour-database/issues>.
You will be notified automatically of any progress on your issue.
=head2 Source Code
This is open source software. The code repository is available for
public review and contribution under the terms of the license.
L<https://github.com/sharabash/mojolicious-plugin-nour-database>
git clone git://github.com/sharabash/mojolicious-plugin-nour-database.git
=head1 AUTHOR
Nour Sharabash <amirite@cpan.org>
=head1 CONTRIBUTOR
Nour Sharabash <nour.sharabash@gmail.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Nour Sharabash.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 0.598 second using v1.01-cache-2.11-cpan-5735350b133 )