remove bookshop service, rename app router directory
This commit is contained in:
1
app-router/bookshop
Symbolic link
1
app-router/bookshop
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../bookshop/app/vue
|
||||||
1
app-router/orders
Symbolic link
1
app-router/orders
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../orders/app/orders
|
||||||
1
app-router/reviews
Symbolic link
1
app-router/reviews
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../reviews/app/vue
|
||||||
@@ -14,19 +14,19 @@
|
|||||||
{
|
{
|
||||||
"source": "^/admin/(.*)$",
|
"source": "^/admin/(.*)$",
|
||||||
"target": "/admin/$1",
|
"target": "/admin/$1",
|
||||||
"destination": "bookshop-api",
|
"destination": "bookstore-api",
|
||||||
"csrfProtection": true
|
"csrfProtection": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "^/browse/(.*)$",
|
"source": "^/browse/(.*)$",
|
||||||
"target": "/browse/$1",
|
"target": "/browse/$1",
|
||||||
"destination": "bookshop-api",
|
"destination": "bookstore-api",
|
||||||
"csrfProtection": true
|
"csrfProtection": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "^/user/(.*)$",
|
"source": "^/user/(.*)$",
|
||||||
"target": "/user/$1",
|
"target": "/user/$1",
|
||||||
"destination": "bookshop-api",
|
"destination": "bookstore-api",
|
||||||
"csrfProtection": true
|
"csrfProtection": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -41,24 +41,6 @@
|
|||||||
"destination": "reviews-api",
|
"destination": "reviews-api",
|
||||||
"csrfProtection": true
|
"csrfProtection": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "^/mashup/admin/(.*)$",
|
|
||||||
"target": "/admin/$1",
|
|
||||||
"destination": "bookstore-api",
|
|
||||||
"csrfProtection": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "^/mashup/browse/(.*)$",
|
|
||||||
"target": "/browse/$1",
|
|
||||||
"destination": "bookstore-api",
|
|
||||||
"csrfProtection": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "^/mashup/user/(.*)$",
|
|
||||||
"target": "/user/$1",
|
|
||||||
"destination": "bookstore-api",
|
|
||||||
"csrfProtection": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "^(.*)$",
|
"source": "^(.*)$",
|
||||||
"target": "$1",
|
"target": "$1",
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../bookshop/app/vue
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../orders/app/orders
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../reviews/app/vue
|
|
||||||
@@ -26,8 +26,7 @@ module.exports = async()=>{ // called by server.js
|
|||||||
//
|
//
|
||||||
// Create an order with the OrdersService when CatalogService signals a new order
|
// Create an order with the OrdersService when CatalogService signals a new order
|
||||||
//
|
//
|
||||||
const messaging = await cds.connect.to('messaging')
|
CatalogService.on ('OrderedBook', async (msg) => {
|
||||||
messaging.on('CatalogService.OrderedBook', async (msg) => {
|
|
||||||
const { book, quantity, buyer } = msg.data
|
const { book, quantity, buyer } = msg.data
|
||||||
const { title, price } = await db.read (Books, book, b => { b.title, b.price })
|
const { title, price } = await db.read (Books, book, b => { b.title, b.price })
|
||||||
return OrdersService.create ('OrdersNoDraft').entries({
|
return OrdersService.create ('OrdersNoDraft').entries({
|
||||||
|
|||||||
@@ -1,139 +0,0 @@
|
|||||||
{
|
|
||||||
"file_suffixes": {
|
|
||||||
"csv": {
|
|
||||||
"plugin_name": "com.sap.hana.di.tabledata.source"
|
|
||||||
},
|
|
||||||
"hdbafllangprocedure": {
|
|
||||||
"plugin_name": "com.sap.hana.di.afllangprocedure"
|
|
||||||
},
|
|
||||||
"hdbanalyticprivilege": {
|
|
||||||
"plugin_name": "com.sap.hana.di.analyticprivilege"
|
|
||||||
},
|
|
||||||
"hdbcalculationview": {
|
|
||||||
"plugin_name": "com.sap.hana.di.calculationview"
|
|
||||||
},
|
|
||||||
"hdbcollection": {
|
|
||||||
"plugin_name": "com.sap.hana.di.collection"
|
|
||||||
},
|
|
||||||
"hdbconstraint": {
|
|
||||||
"plugin_name": "com.sap.hana.di.constraint"
|
|
||||||
},
|
|
||||||
"hdbdropcreatetable": {
|
|
||||||
"plugin_name": "com.sap.hana.di.dropcreatetable"
|
|
||||||
},
|
|
||||||
"hdbflowgraph": {
|
|
||||||
"plugin_name": "com.sap.hana.di.flowgraph"
|
|
||||||
},
|
|
||||||
"hdbfunction": {
|
|
||||||
"plugin_name": "com.sap.hana.di.function"
|
|
||||||
},
|
|
||||||
"hdbgraphworkspace": {
|
|
||||||
"plugin_name": "com.sap.hana.di.graphworkspace"
|
|
||||||
},
|
|
||||||
"hdbhadoopmrjob": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualfunctionpackage.hadoop"
|
|
||||||
},
|
|
||||||
"hdbindex": {
|
|
||||||
"plugin_name": "com.sap.hana.di.index"
|
|
||||||
},
|
|
||||||
"hdblibrary": {
|
|
||||||
"plugin_name": "com.sap.hana.di.library"
|
|
||||||
},
|
|
||||||
"hdbmigrationtable": {
|
|
||||||
"plugin_name": "com.sap.hana.di.table.migration"
|
|
||||||
},
|
|
||||||
"hdbprocedure": {
|
|
||||||
"plugin_name": "com.sap.hana.di.procedure"
|
|
||||||
},
|
|
||||||
"hdbprojectionview": {
|
|
||||||
"plugin_name": "com.sap.hana.di.projectionview"
|
|
||||||
},
|
|
||||||
"hdbprojectionviewconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.projectionview.config"
|
|
||||||
},
|
|
||||||
"hdbreptask": {
|
|
||||||
"plugin_name": "com.sap.hana.di.reptask"
|
|
||||||
},
|
|
||||||
"hdbresultcache": {
|
|
||||||
"plugin_name": "com.sap.hana.di.resultcache"
|
|
||||||
},
|
|
||||||
"hdbrole": {
|
|
||||||
"plugin_name": "com.sap.hana.di.role"
|
|
||||||
},
|
|
||||||
"hdbroleconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.role.config"
|
|
||||||
},
|
|
||||||
"hdbsearchruleset": {
|
|
||||||
"plugin_name": "com.sap.hana.di.searchruleset"
|
|
||||||
},
|
|
||||||
"hdbsequence": {
|
|
||||||
"plugin_name": "com.sap.hana.di.sequence"
|
|
||||||
},
|
|
||||||
"hdbstatistics": {
|
|
||||||
"plugin_name": "com.sap.hana.di.statistics"
|
|
||||||
},
|
|
||||||
"hdbstructuredprivilege": {
|
|
||||||
"plugin_name": "com.sap.hana.di.structuredprivilege"
|
|
||||||
},
|
|
||||||
"hdbsynonym": {
|
|
||||||
"plugin_name": "com.sap.hana.di.synonym"
|
|
||||||
},
|
|
||||||
"hdbsynonymconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.synonym.config"
|
|
||||||
},
|
|
||||||
"hdbsystemversioning": {
|
|
||||||
"plugin_name": "com.sap.hana.di.systemversioning"
|
|
||||||
},
|
|
||||||
"hdbtable": {
|
|
||||||
"plugin_name": "com.sap.hana.di.table"
|
|
||||||
},
|
|
||||||
"hdbtabledata": {
|
|
||||||
"plugin_name": "com.sap.hana.di.tabledata"
|
|
||||||
},
|
|
||||||
"hdbtabletype": {
|
|
||||||
"plugin_name": "com.sap.hana.di.tabletype"
|
|
||||||
},
|
|
||||||
"hdbtrigger": {
|
|
||||||
"plugin_name": "com.sap.hana.di.trigger"
|
|
||||||
},
|
|
||||||
"hdbview": {
|
|
||||||
"plugin_name": "com.sap.hana.di.view"
|
|
||||||
},
|
|
||||||
"hdbvirtualfunction": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualfunction"
|
|
||||||
},
|
|
||||||
"hdbvirtualfunctionconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualfunction.config"
|
|
||||||
},
|
|
||||||
"hdbvirtualpackagehadoop": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualpackage.hadoop"
|
|
||||||
},
|
|
||||||
"hdbvirtualpackagesparksql": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualpackage.sparksql"
|
|
||||||
},
|
|
||||||
"hdbvirtualprocedure": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualprocedure"
|
|
||||||
},
|
|
||||||
"hdbvirtualprocedureconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualprocedure.config"
|
|
||||||
},
|
|
||||||
"hdbvirtualtable": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualtable"
|
|
||||||
},
|
|
||||||
"hdbvirtualtableconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.virtualtable.config"
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"plugin_name": "com.sap.hana.di.tabledata.properties"
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"plugin_name": "com.sap.hana.di.tabledata.properties"
|
|
||||||
},
|
|
||||||
"txt": {
|
|
||||||
"plugin_name": "com.sap.hana.di.copyonly"
|
|
||||||
},
|
|
||||||
"hdbeshconfig": {
|
|
||||||
"plugin_name": "com.sap.hana.di.eshconfig"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
"src/gen/**/*.hdbview",
|
|
||||||
"src/gen/**/*.hdbindex",
|
|
||||||
"src/gen/**/*.hdbconstraint",
|
|
||||||
"src/gen/**/*_drafts.hdbtable",
|
|
||||||
"src/gen/**/*.hdbcalculationview"
|
|
||||||
]
|
|
||||||
30
mta.yaml
30
mta.yaml
@@ -10,31 +10,10 @@ build-parameters:
|
|||||||
commands:
|
commands:
|
||||||
- npm ci
|
- npm ci
|
||||||
- npx cds build --for hana --production --ws
|
- npx cds build --for hana --production --ws
|
||||||
- npx cds build ./bookshop --for nodejs --production --ws-pack
|
|
||||||
- npx cds build ./orders --for nodejs --production --ws-pack
|
- npx cds build ./orders --for nodejs --production --ws-pack
|
||||||
- npx cds build ./reviews --for nodejs --production --ws-pack
|
- npx cds build ./reviews --for nodejs --production --ws-pack
|
||||||
- npx cds build ./bookstore --for nodejs --production --ws-pack
|
- npx cds build ./bookstore --for nodejs --production --ws-pack
|
||||||
modules:
|
modules:
|
||||||
- name: bookshop-srv
|
|
||||||
type: nodejs
|
|
||||||
path: bookshop/gen/srv
|
|
||||||
parameters:
|
|
||||||
buildpack: nodejs_buildpack
|
|
||||||
readiness-health-check-type: http
|
|
||||||
readiness-health-check-http-endpoint: /health
|
|
||||||
disk-quota: 256M
|
|
||||||
memory: 256M
|
|
||||||
build-parameters:
|
|
||||||
builder: npm
|
|
||||||
provides:
|
|
||||||
- name: bookshop-api
|
|
||||||
properties:
|
|
||||||
srv-url: ${default-url}
|
|
||||||
requires:
|
|
||||||
- name: samples-messaging
|
|
||||||
- name: samples-db
|
|
||||||
- name: samples-auth
|
|
||||||
|
|
||||||
- name: orders-srv
|
- name: orders-srv
|
||||||
type: nodejs
|
type: nodejs
|
||||||
path: orders/gen/srv
|
path: orders/gen/srv
|
||||||
@@ -106,18 +85,12 @@ modules:
|
|||||||
|
|
||||||
- name: samples
|
- name: samples
|
||||||
type: approuter.nodejs
|
type: approuter.nodejs
|
||||||
path: app/router
|
path: app-router
|
||||||
parameters:
|
parameters:
|
||||||
keep-existing-routes: true
|
keep-existing-routes: true
|
||||||
disk-quota: 256M
|
disk-quota: 256M
|
||||||
memory: 256M
|
memory: 256M
|
||||||
requires:
|
requires:
|
||||||
- name: bookshop-api
|
|
||||||
group: destinations
|
|
||||||
properties:
|
|
||||||
name: bookshop-api # must be used in xs-app.json as well
|
|
||||||
url: ~{srv-url}
|
|
||||||
forwardAuthToken: true
|
|
||||||
- name: orders-api
|
- name: orders-api
|
||||||
group: destinations
|
group: destinations
|
||||||
properties:
|
properties:
|
||||||
@@ -141,7 +114,6 @@ modules:
|
|||||||
- name: destination-content
|
- name: destination-content
|
||||||
type: com.sap.application.content
|
type: com.sap.application.content
|
||||||
requires:
|
requires:
|
||||||
- name: bookshop-api
|
|
||||||
- name: orders-api
|
- name: orders-api
|
||||||
- name: reviews-api
|
- name: reviews-api
|
||||||
- name: bookstore-api
|
- name: bookstore-api
|
||||||
|
|||||||
Reference in New Issue
Block a user