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.
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.