0.1.0 • Published 4 years ago

mariadb2 v0.1.0

Weekly downloads
2
License
GPLv3
Repository
-
Last release
4 years ago

MariaDB 2

GitHub package.json version   npm   Dependents (via libraries.io)   NPM

Installation:

To install this package simply run: npm install mariadb2

Usage:

Basic configuration:

Basic configuration of MariaDB2 can be done as so:

const MariaDB = require('mariadb2');
const client = new MariaDB({
  database: "My-super-cool-database",
  password: "super secure password1"
})

That is it, that is all you need to provide, but only if you are running a fresh MariaDB install on your local network, and are using the root user to access it. For other configurations you must still provide the password and database to connect to, however if you are using a different user, just a user value to the configuration. the same goes if you are using a different port that is not port 3306 for your database, simply add a port field to the config. want more than 5 connections sitting in your pool? add a connectionLimit field to your config with a number and this module sorts the rest.

Running SQL:

This is simple, simply use:

client.query("SQL HERE", (error, data) => {
  if error throw error;
  //do something with the data
})

More documentation coming soon, as well as more features.

0.1.0

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago