mysql-router

0.0.1 • Public • Published

mysql-router

Build Status dependencies dev dependencies

Downloads Downloads npm version License

Code Climate Discord Chat PayPal

Mysql is a trademark or registered trademark of Oracle Corporation in the U.S. and/or other countries. "mysql-router" is not operated by, sponsored by, or affiliated with Oracle Corporation in any way.

Install

$ npm install mysql-router

Information

Documentation on Object Class Structure & Functions can be found at the Official Github Pages

Tutorials, Guides, and More can be Found at the Official Github Wiki

If any information is Lacking please Post a Question in the Github Issues Section.

Example Code:

Example Project:

Usage of Mysql Router

Configure

Config Options

Without SSL
var mysql = require('mysql-router');
mysql.StartPool({
  connectionLimit: 100,
  host: "127.0.0.1",
  post: 3306,
  user: "test",
  password: "test",
  database: "test",
  charset: "utf8mb4", // Note: This is very Specific to Discord. Just saying.
});
With SSL
var mysql = require('mysql-router');
var fs = require('fs');
var path = require('path');
mysql.StartPool({
  connectionLimit: 100,
  host: "127.0.0.1",
  post: 3306,
  user: "test",
  password: "test",
  database: "test",
  charset: "utf8mb4", // Note: This is very Specific to Discord. Just saying.
  ssl: {
    ca: fs.readFileSync(path.join(__dirname, 'ssl', 'server-ca.pem')),
    key: fs.readFileSync(path.join(__dirname, 'ssl', 'client-key.pem')),
    cert: fs.readFileSync(path.join(__dirname, 'ssl', 'client-cert.pem'))
  }
});

Issue

If any Issues Please Submit them on the Github!

Example

/index.js

var mysql = require('mysql-router');
var util = require('util');
mysql.StartPool({
  connectionLimit: 100,
  host: "127.0.0.1",
  post: 3306,
  user: "test",
  password: "test",
  database: "test",
  charset: "utf8mb4", // Note: This is very Specific to Discord. Just saying.
});
 
mysql.Query(`CREATE TABLE Persons (
    PersonID int,
    LastName varchar(255),
    FirstName varchar(255),
    Address varchar(255),
    City varchar(255)
);`, []).then((d) => {
  console.log(`Data from Query: ${${util.inspect(d, false, null)}}`);
}).catch((e) => {
  console.log(${util.inspect(e, false, null)});
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i mysql-router

Weekly Downloads

0

Version

0.0.1

License

GPL-3.0-or-later

Unpacked Size

47.8 kB

Total Files

7

Last publish

Collaborators

  • bioblaze