Skip to content

Commit 480a16d

Browse files
committed
remove bookshop service, rename app router directory
1 parent 44088c6 commit 480a16d

14 files changed

+8
-201
lines changed

app-router/bookshop

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../bookshop/app/vue

app-router/orders

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../orders/app/orders
File renamed without changes.
File renamed without changes.

app-router/reviews

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../reviews/app/vue

app/router/xs-app.json app-router/xs-app.json

+3-21
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
{
1515
"source": "^/admin/(.*)$",
1616
"target": "/admin/$1",
17-
"destination": "bookshop-api",
17+
"destination": "bookstore-api",
1818
"csrfProtection": true
1919
},
2020
{
2121
"source": "^/browse/(.*)$",
2222
"target": "/browse/$1",
23-
"destination": "bookshop-api",
23+
"destination": "bookstore-api",
2424
"csrfProtection": true
2525
},
2626
{
2727
"source": "^/user/(.*)$",
2828
"target": "/user/$1",
29-
"destination": "bookshop-api",
29+
"destination": "bookstore-api",
3030
"csrfProtection": true
3131
},
3232
{
@@ -41,24 +41,6 @@
4141
"destination": "reviews-api",
4242
"csrfProtection": true
4343
},
44-
{
45-
"source": "^/mashup/admin/(.*)$",
46-
"target": "/admin/$1",
47-
"destination": "bookstore-api",
48-
"csrfProtection": true
49-
},
50-
{
51-
"source": "^/mashup/browse/(.*)$",
52-
"target": "/browse/$1",
53-
"destination": "bookstore-api",
54-
"csrfProtection": true
55-
},
56-
{
57-
"source": "^/mashup/user/(.*)$",
58-
"target": "/user/$1",
59-
"destination": "bookstore-api",
60-
"csrfProtection": true
61-
},
6244
{
6345
"source": "^(.*)$",
6446
"target": "$1",

app/router/bookshop

-1
This file was deleted.

app/router/orders

-1
This file was deleted.

app/router/reviews

-1
This file was deleted.
File renamed without changes.

bookstore/srv/mashup.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ module.exports = async()=>{ // called by server.js
2626
//
2727
// Create an order with the OrdersService when CatalogService signals a new order
2828
//
29-
const messaging = await cds.connect.to('messaging')
30-
messaging.on('CatalogService.OrderedBook', async (msg) => {
29+
CatalogService.on ('OrderedBook', async (msg) => {
3130
const { book, quantity, buyer } = msg.data
3231
const { title, price } = await db.read (Books, book, b => { b.title, b.price })
3332
return OrdersService.create ('OrdersNoDraft').entries({

db/src/.hdiconfig

-139
This file was deleted.

db/undeploy.json

-7
This file was deleted.

mta.yaml

+1-29
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,10 @@ build-parameters:
1010
commands:
1111
- npm ci
1212
- npx cds build --for hana --production --ws
13-
- npx cds build ./bookshop --for nodejs --production --ws-pack
1413
- npx cds build ./orders --for nodejs --production --ws-pack
1514
- npx cds build ./reviews --for nodejs --production --ws-pack
1615
- npx cds build ./bookstore --for nodejs --production --ws-pack
1716
modules:
18-
- name: bookshop-srv
19-
type: nodejs
20-
path: bookshop/gen/srv
21-
parameters:
22-
buildpack: nodejs_buildpack
23-
readiness-health-check-type: http
24-
readiness-health-check-http-endpoint: /health
25-
disk-quota: 256M
26-
memory: 256M
27-
build-parameters:
28-
builder: npm
29-
provides:
30-
- name: bookshop-api
31-
properties:
32-
srv-url: ${default-url}
33-
requires:
34-
- name: samples-messaging
35-
- name: samples-db
36-
- name: samples-auth
37-
3817
- name: orders-srv
3918
type: nodejs
4019
path: orders/gen/srv
@@ -106,18 +85,12 @@ modules:
10685

10786
- name: samples
10887
type: approuter.nodejs
109-
path: app/router
88+
path: app-router
11089
parameters:
11190
keep-existing-routes: true
11291
disk-quota: 256M
11392
memory: 256M
11493
requires:
115-
- name: bookshop-api
116-
group: destinations
117-
properties:
118-
name: bookshop-api # must be used in xs-app.json as well
119-
url: ~{srv-url}
120-
forwardAuthToken: true
12194
- name: orders-api
12295
group: destinations
12396
properties:
@@ -141,7 +114,6 @@ modules:
141114
- name: destination-content
142115
type: com.sap.application.content
143116
requires:
144-
- name: bookshop-api
145117
- name: orders-api
146118
- name: reviews-api
147119
- name: bookstore-api

0 commit comments

Comments
 (0)