Skip to content

Commit

Permalink
fix: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolabovolato committed May 1, 2024
1 parent 3759e43 commit ac8c2d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const container = new IocContainer()
const app = new AppBuilder(container)
// Lifecycle management
.configureLifecycle((b, c) => b
.addHealthcheck("svc", (c) => c.svc) // Healthchecks
// Healthchecks
.addHealthcheck("svc", (c) => c.svc)
// Plugins
.with(lifecyclePlugin, (b) => b
.addFastifyEntrypoint("http", (f) => f
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/core-concepts/healthchecks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ such as a database query to check if connectivity works.
In Basica, they can be easily added in all your services by implementing `IHealthcheck`.

:::note
Services and Entrypoint registered in the lifecycle will automatically be registered as healthchecks if they have a healthcheck function.
Any registered service or entrypoint implementing `IHealthcheck` will also be registered as an healthcheck.
:::

## Implementing IHealthcheck
Expand Down
5 changes: 3 additions & 2 deletions packages/docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ const container = new IocContainer()
const app = new AppBuilder(container)
// Lifecycle management
.configureLifecycle((b, c) => b
.addHealthcheck("svc", (c) => c.svc) // Healthchecks
// Healthchecks
.addHealthcheck("svc", (c) => c.svc)
// Plugins
.with(lifecyclePlugin, (b) => b
.addFastifyEntrypoint("http", (f) => f
Expand Down Expand Up @@ -141,7 +142,7 @@ export default function Home(): JSX.Element {
Seamless integration with your favorite library
</Card>
<Card title={"Healthchecks"} icon={<Icon name="heartbeat" />}>
Check on a glance if your service up and running
Check on a glance if your service is up and running
</Card>
<Card title={"Structured logging"} icon={<Icon name="brackets" />}>
Fast, structured logging provided by Pino
Expand Down

0 comments on commit ac8c2d8

Please sign in to comment.