Skip to main content

Built and signed on GitHub Actions

Works with
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score88%
License
MIT
Downloads11/wk
Published2 days ago (2.1.2)

MySQL/MariaDB drivers for Fedify

@fedify/mysql: MySQL/MariaDB drivers for Fedify

JSR npm

This package provides Fedify's KvStore and MessageQueue implementations for MySQL/MariaDB:

import { createFederation } from "@fedify/fedify";
import { MysqlKvStore, MysqlMessageQueue } from "@fedify/mysql";
import mysql from "mysql2/promise";

const pool = mysql.createPool("mysql://user:password@localhost/dbname");

const federation = createFederation({
  kv: new MysqlKvStore(pool),
  queue: new MysqlMessageQueue(pool),
});

Installation

deno add jsr:@fedify/mysql              # Deno
npm  add     @fedify/mysql mysql2       # npm
pnpm add     @fedify/mysql mysql2       # pnpm
yarn add     @fedify/mysql mysql2       # Yarn
bun  add     @fedify/mysql mysql2       # Bun
Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/mysql

Import symbol

import * as mysql from "@fedify/mysql";
or

Import directly with a jsr specifier

import * as mysql from "jsr:@fedify/mysql";