Run Reviews and Orders embedded in MT scenario

This makes deployment much simpler
This commit is contained in:
Christian Georgi
2022-08-03 16:25:06 +02:00
parent ea989d8496
commit 5bda368169
2 changed files with 9 additions and 2 deletions

View File

@@ -19,4 +19,4 @@ module.exports = cds.server
// For didactic reasons in capire // For didactic reasons in capire
const { ReviewsService, OrdersService } = cds.requires const { ReviewsService, OrdersService } = cds.requires
if (!ReviewsService.credentials && !OrdersService.credentials) cds.requires.messaging = false if (!ReviewsService?.credentials && !OrdersService?.credentials) cds.requires.messaging = false

View File

@@ -6,3 +6,10 @@ const proxyOpts = global.it ? { target:'auto' } : {} // for tests, set 'auto' to
cds.on('bootstrap', app => app.use(proxy(proxyOpts))) cds.on('bootstrap', app => app.use(proxy(proxyOpts)))
module.exports = require('@capire/bookstore/server.js') module.exports = require('@capire/bookstore/server.js')
// For didactic reasons in capire, run below services embedded
// TODO find a better way to switch this
if (cds.requires.multitenancy) {
cds.requires.OrdersService = null
cds.requires.ReviewsService = null
}