mirror of
https://github.com/BradNut/TofuStack
synced 2025-09-08 17:40:26 +00:00
12 lines
294 B
TypeScript
12 lines
294 B
TypeScript
|
|
import { container } from 'tsyringe';
|
||
|
|
import { db } from '../infrastructure/database';
|
||
|
|
|
||
|
|
// Symbol
|
||
|
|
export const DatabaseProvider = Symbol('DATABASE_TOKEN');
|
||
|
|
|
||
|
|
// Type
|
||
|
|
export type DatabaseProvider = typeof db;
|
||
|
|
|
||
|
|
// Register
|
||
|
|
container.register<DatabaseProvider>(DatabaseProvider, { useValue: db });
|