JSPM

  • Created
  • Published
  • Downloads 261
  • Score
    100M100P100Q92587F
  • License SEE LICENSE

MySQL storage adapter for nauth-toolkit via TypeORM

Package Exports

  • @nauth-toolkit/database-typeorm-mysql

Readme

@nauth-toolkit/database-typeorm-mysql

MySQL / MariaDB database adapter for nauth-toolkit.

Same entity structure and behavior as the PostgreSQL adapter โ€” swap the driver, keep the same auth logic.

Documentation ยท GitHub

Part of nauth-toolkit. Requires @nauth-toolkit/core.


Install

npm install @nauth-toolkit/core @nauth-toolkit/database-typeorm-mysql

Usage

import { DataSource } from 'typeorm';
import { getNAuthEntities } from '@nauth-toolkit/database-typeorm-mysql';

const dataSource = new DataSource({
  type: 'mysql',
  url: process.env.DATABASE_URL,
  entities: getNAuthEntities(),
  synchronize: true, // dev only
});

Also available

Package Purpose
@nauth-toolkit/database-typeorm-postgres PostgreSQL โ€” recommended for most deployments

See the full package list in the core README.


Free to use. See license.