Using load: directoryLoader #207
-
Hi, when i set load: directory Loader i get the following error. [ExceptionHandler] Nest can't resolve dependencies of the AppService (RootConfig, ?, TableConfig). Please make sure that the argument DatabaseConfig at index [1] is available in the AppModule context. Potential solutions:
My code is the example. I create a new route for my environment configuration with the following configuration:
and // app.service.tsimport { Injectable } from '@nestjs/common'; @Injectable() // enjoy type safety!
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Please provide a minimum reproduction repo to help better investigation. |
Beta Was this translation helpful? Give feedback.
-
Directory loader is used when you want to split config into small files, and each file name represents a namespace. For example, |
Beta Was this translation helpful? Give feedback.
Directory loader is used when you want to split config into small files, and each file name represents a namespace. For example,
foo.json
with{"bar": 1}
will become{"foo":{"bar":1}}
. You should usefileLoader
instead.