How to use the db-migrate/lib/config.js.load function in db-migrate

To help you get started, we’ve selected a few db-migrate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wzrdtales / node-ultimate-migrate / index.js View on Github external
function loadConfig()
{
    if ( process.env.DATABASE_URL )
    {
        config.loadUrl( process.env.DATABASE_URL, argv.env );
    }
    else
    {
        config.load( argv.config, argv.env );
    }

    if ( verbose )
    {
        var current = config.getCurrent();
        var s = JSON.parse( JSON.stringify( current.settings ) );

        if ( s.password )
            s.password = '******';

        log.info( 'Using', current.env, 'settings:', s );
    }
}