Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ export default defineConfig({
{ text: 'Getting Started', link: '/getting-started/introduction' },
{ text: 'Guide', link: '/guides/dependency-injection' },
{ text: 'Reference', link: '/reference/' },
{
text: 'npm',
link: 'https://www.npmjs.com/package/@haskou/ddd-kernel',
},
],

sidebar: {
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Most applications should configure DI through the kernel:
const kernel = new Kernel();

await kernel.dependencyInjection({
containerBuild: process.env.NODE_ENV === 'production',
containerBuild: process.env.NODE_ENV !== 'production',
});
```

Expand Down
6 changes: 5 additions & 1 deletion docs/reference/kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Most applications call this once during startup:

```ts
await kernel.dependencyInjection({
containerBuild: process.env.NODE_ENV === 'production',
containerBuild: process.env.NODE_ENV !== 'production',
overrides: [],
});
```
Expand All @@ -62,6 +62,10 @@ await kernel.dependencyInjection({
| `servicesYamlPath` | Constructor option or `config/container/services.yaml` | Container YAML path for this compile. |
| `sourceDirectory` | Constructor option or `src` | Source tree used when generating the container. |

Use `containerBuild: true` while generating `services.yaml` from the source
tree. Production runtimes should usually leave it `false` and load the YAML
shipped with the application artifact.

Prefer constructor injection in application classes. Use overrides at bootstrap
or test setup to choose infrastructure.

Expand Down
Loading