/jw-mysql-admin

A basic MySQL client middleware for node with express.

Primary LanguageJavaScriptMIT LicenseMIT

jw-mysql-admin

A basic MySQL client middleware for node with express.

NPM version build status node version npm download

Install

NPM

Methods

Method Parameters Description
<main> presetCredentials (optional) : {

host:string
port:string
user:string
password:string
}

the preset connection information which will be passed into client as configuration programmatically when connecting to a MySQL database.

Usage

import express from "express";
import mysqlAdmin from "jw-mysql-admin";

const app = express();
const port = process.env.PORT || 3000;

app.use("/mysql-admin", mysqlAdmin());

app.listen(port);

Using mysql admin client

The react client is located on whatever path the middleware is set. For example from above - it is located at http://localhost:3000/mysql-admin. It uses the database connection information as an authentication, and will prompt for any required information which is not provided in the preset credentials until a successful connection is made.