Run Reviews and Orders embedded in MT scenario
This makes deployment much simpler
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user