@nauth-toolkit/database-typeorm-mysql
v0.2.6
Published
MySQL storage adapter for nauth-toolkit via TypeORM
Maintainers
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.
Part of nauth-toolkit. Requires
@nauth-toolkit/core.
Install
npm install @nauth-toolkit/core @nauth-toolkit/database-typeorm-mysqlUsage
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.
