Update docs/backend-system/building-backends/08-migrating.md

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-01-19 13:40:59 +01:00
parent 4727161be9
commit 1d742a3733
2 changed files with 1 additions and 10 deletions
@@ -101,12 +101,3 @@ const backend = createBackend({
],
});
```
### Migrating Your Own Utilities Into Services
As your backends grow in complexity, you may have started writing utility
classes with shared backend functionality, that you pass down into your plugins.
Maybe you have placed them into your `PluginEnvironment` in
`packages/backend/src/types.ts`. If this applies to you, you'll probably be
interested in migrating those to become proper backend services according to the
new backend system, so that they can be dependency injected into your backends.
@@ -165,7 +165,7 @@ custom API, so we use a helper function to transform that particular one.
To make additions as mentioned above to the environment, you will start to get
into the weeds of how the backend system wiring works. You'll need to have a
service reference, and a service factory that performs the actual creation of
service reference and a service factory that performs the actual creation of
your service. Please see [the services
article](../architecture/03-services.md#defining-a-service) to learn how to
create a service ref and its default factory. You can place that code directly