forked from mosaicstack/stack
feat: gateway CRUD routes — conversations, projects, missions, tasks (P1-005/006) (#72)
Co-authored-by: Jason Woltje <[email protected]> Co-committed-by: Jason Woltje <[email protected]>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { createBrain, type Brain } from '@mosaic/brain';
|
||||
import type { Db } from '@mosaic/db';
|
||||
import { DB } from '../database/database.module.js';
|
||||
|
||||
export const BRAIN = 'BRAIN';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [
|
||||
{
|
||||
provide: BRAIN,
|
||||
useFactory: (db: Db): Brain => createBrain(db),
|
||||
inject: [DB],
|
||||
},
|
||||
],
|
||||
exports: [BRAIN],
|
||||
})
|
||||
export class BrainModule {}
|
||||
Reference in New Issue
Block a user