Skip to content
This repository has been archived by the owner on Oct 9, 2021. It is now read-only.

Commit

Permalink
Syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
chgeo committed Sep 25, 2019
1 parent 567a8a0 commit 658d44d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions exercises-node/exercise03/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For all exercises please make sure to use **Google Chrome**. If you haven't comp

And run the following command:

```
```sh
npm install $(npm pack ./reviews-service -s)
```

Expand All @@ -53,7 +53,7 @@ For all exercises please make sure to use **Google Chrome**. If you haven't comp

Add the following content:

```
```swift
// Adding reviews via capire-reviews service
using { sap.capire.reviews.ReviewsService } from 'reviews-service';
```
Expand All @@ -64,7 +64,7 @@ For all exercises please make sure to use **Google Chrome**. If you haven't comp

5. To test the reuse, we'll run the bookstore application. From the terminal execute:

```
```sh
cds run bookstore --in-memory
```

Expand Down Expand Up @@ -107,7 +107,7 @@ For all exercises please make sure to use **Google Chrome**. If you haven't comp

d. Paste and execute the following curl command in a new the terminal:

```
```sh
curl -X POST http:https://localhost:4004/reviews/Reviews \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -158,22 +158,22 @@ In order to consume events of the reviews service as an external service, we onl

b. In the same terminal execute

```
```sh
CDS_REQUIRES_MESSAGING_CREDENTIALS_FILE=default cds run reviews-service --in-memory
```
This will run the reviews-service and use a file to propagate events.

c. To start the bookstore, open a new terminal in the **packages** folder.

```
```sh
PORT=4005 cds run bookstore --in-memory
```

d. Open a third terminal window and execute the following curl command:

```
```sh
curl -X POST http:https://localhost:4004/reviews/Reviews \
-H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -204,13 +204,13 @@ First, in the bookstore we need to declare the reviews service as an OData servi

Replace

```
```swift
using { sap.capire.reviews.ReviewsService } from 'reviews-service';
```

with

```
```swift
using { sap.capire.reviews.ReviewsService as external} from 'reviews-service';

extend service CatalogService {
Expand All @@ -220,7 +220,7 @@ First, in the bookstore we need to declare the reviews service as an OData servi

2. In the `services.js` file add the following code at the end of the file before the closing `}` bracket:

```
```js
// delegate requests to reviews service
srv.on('READ', 'Reviews', async (req) => {
const { Reviews } = reviews_srv.entities
Expand Down

0 comments on commit 658d44d

Please sign in to comment.