0.1.0 • Published 8 years ago

mysql-slim v0.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

MySQL driver

    const options = {
      user: 'dbuser',
      password: 'dbpassword',
      database: 'foobar'
    };

    const db = require('mysql-slim')(options);

    db.execute('SELECT * FROM users WHERE id = ?', [1]).then((rows) => {
      console.info(rows);
    });

Installation

$ npm i mysql-slim

Options

const db = require('mysql-slim')(options);

PropertyDescriptionDefault
hostThe hostname of the database you are connecting to."localhost"
portThe port number to connect to.3306
userThe MySQL user to authenticate as.
passwordThe password of that MySQL user.
databaseName of the database to use for this connection.

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm i
$ npm test
0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago