From d05fde3fc7ea2aeb6b1217ceb74ee08f0a611f5d Mon Sep 17 00:00:00 2001
From: melonges <melonges@icloud.com>
Date: Fri, 24 Nov 2023 01:05:18 +0300
Subject: [PATCH] Update stack-node.md

https://github.com/redis-stack/redis-stack-docs/issues/227
---
 docs/stack/clients/om-clients/stack-node.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/stack/clients/om-clients/stack-node.md b/docs/stack/clients/om-clients/stack-node.md
index 860783f..be7f4df 100644
--- a/docs/stack/clients/om-clients/stack-node.md
+++ b/docs/stack/clients/om-clients/stack-node.md
@@ -172,11 +172,11 @@ A `text` field is a lot like a `string`. If you're just reading and writing obje
 
 ### Repository
 
-Now we have all the pieces that we need to create a **repository**. A `Repository` is the main interface into Redis OM. It gives us the methods to read, write, and remove a specific `Entity`. Create a `Repository` in `person.js` and make sure it's exported as you'll need it when we start implementing out API:
+Now we have all the pieces that we need to create a **repository**. A `Repository` is the main interface into Redis OM. It gives us the methods to read, write, and remove a specific `Entity`. Fetch a `Repository` in `person.js` using `fetchRepository` and make sure it's exported as you'll need it when we start implementing out API:
 
 {{< highlight javascript >}}
 /* use the client to create a Repository just for Persons */
-export const personRepository = new Repository(personSchema, client)
+export const personRepository = client.fetchRepository(personSchema)
 {{< / highlight >}}
 
 We're almost done with setting up our repository. But we still need to create an index or we won't be able to search. We do that by calling `.createIndex()`. If an index already exists and it's identical, this function won't do anything. If it's different, it'll drop it and create a new one. Add a call to `.createIndex()` to `person.js`: