Skip to main content

MySQL

The MySQL database can be used as database for StoryBooker.

Install

npm i @storybooker/sql mysql

Usage

import { MySQLDatabaseAdapter } from "@storybooker/sql/mysql";
import mysql from "mysql";

// Initialize the SQL client
const client = mysql.createConnection({
host: "localhost",
user: "me",
password: "secret",
database: "my_db",
});
// Create the service adapter
const database = new MySQLDatabaseAdapter(client);

// use as `database` in StoryBooker hosting options.