Skip to content

Commit d30eebb

Browse files
committed
refactor(readme): update database connection example with connectTo function
1 parent 0cde9a9 commit d30eebb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,13 @@ like [neverthrow](https://github.com/supermacro/neverthrow) 's `ResultAsync.from
148148
the library's internal dispatchers rather than your business logic.
149149

150150
```ts
151+
// location: project/mcp/client.ts
151152
import {ResultAsync} from 'neverthrow';
152153
import {MCPError} from "./error";
153154

154-
function connectToDatabase(url: string) {
155+
function connectTo(url: string) {
155156
return ResultAsync.fromPromise(
156-
fetch(url),
157+
client.connect(url),
157158
(_err) => {
158159
// 🚨 THE ISSUE:
159160
// When this callback is executed, the physical execution flow

0 commit comments

Comments
 (0)