Skip to content

kata-ai/merapi-plugin-sql

Repository files navigation

Merapi Plugin SQL

Introduction

Merapi plugin for SQL connection using knex.

Quick Start

Installation

npm install merapi-plugin-sql --save

Configuration

Put knex configuration in config stores.sql:

{
    "name": "merapi",
    "version": "0.1.0",
    "plugins": [
        "sql"
    ],
    "stores": {
        "sql": {
            "client": "mysql",
            "connection": {
                "host": "localhost",
                "user": "localhost",
                "password": "",
                "port": "3306",
                "database": "test-db",
                "encrypt": true
            },
            "pool": { "min": 2, "max": 5 },
            "migrations": {
                "tableName": "migrations"
            }
        }
    }
}