Next Phenomenal Microbrewery

    mysql-wait

    1.1.2 • Public • Published

    MySQL Wait

    A promise based API to wait for a MySQL database to become available.

    Install

    $ npm install mysql-wait

    Usage

    var wait = require('mysql-wait')
    wait({
      host: 'localhost',
      port: 3306,
      user: 'billy',
      password: 'bobjones'
    }).then(function onSuccess () {
        console.log('database is up')
    }, function onFail () {
        console.log('Database took too long, or credentials were bad')
    })

    Options

    host

    The host to connect to. Defaults to localhost.

    port

    The port to connect with. Defaults to 3306.

    user

    The user to connect with. Defaults to root.

    password

    The password to connect with. Has no default.

    timeout

    How many milliseconds the waiter will wait until it fails. Defaults to 60 * 1000

    Keywords

    Install

    npm i mysql-wait

    DownloadsWeekly Downloads

    2

    Version

    1.1.2

    License

    ISC

    Last publish

    Collaborators

    • joshwillik