Replies: 1 comment
-
I figured it out reading through the // app/types/container.ts
import { MongoClient } from 'mongodb'
declare module '@adonisjs/core/types' {
interface ContainerBindings {
mongo: MongoClient
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
No mongoose or anything, I just want to add a simple MongoDB provider and I actually managed to do it.
However, I get typescript errors and it's not type-safe.
Needless to say,
npm run typecheck
fails. Here's the typescript error:Beta Was this translation helpful? Give feedback.
All reactions