Skip to content

Commit de4a3a5

Browse files
committed
improve
1 parent 7fed5b4 commit de4a3a5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

guides/deployment/microservices.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,34 @@ These are the (not so beneficial) side effects you when using a shared persisten
150150
cds init shared-db --add hana
151151
```
152152

153-
```sh
153+
::: code-group
154+
```sh [Node.js]
154155
npm add --workspace shared-db @capire/bookstore
155156
npm add --workspace shared-db @capire/reviews
156157
npm add --workspace shared-db @capire/orders
157158
```
159+
```sh [Java]
160+
npm add --workspace shared-db @capire/bookstore-java
161+
npm add --workspace shared-db @capire/reviews-java
162+
npm add --workspace shared-db @capire/orders-java
163+
```
164+
:::
158165

159166
> Note how *NPM workspaces* allows us to use the package names of the projects, and nicely creates symlinks in *node_modules* accordingly.
160167
161168
2. Add a `shared-db/db/schema.cds` file as a mashup to actually collect the models:
162169

163170
::: code-group
164-
```cds [shared-db/db/schema.cds]
171+
```cds [Node-js]
165172
using from '@capire/bookstore';
166173
using from '@capire/reviews';
167174
using from '@capire/orders';
168175
```
176+
```cds [Java]
177+
using from '@capire/bookstore-java';
178+
using from '@capire/reviews-java';
179+
using from '@capire/orders-java';
180+
```
169181
:::
170182

171183
> Note: the `using` directives refer to `index.cds` files existing in the target packages. Your projects may have different entry points.

0 commit comments

Comments
 (0)