Using ES Modules

This commit is contained in:
Daniel Hutzel
2024-07-16 15:29:45 +02:00
parent 7a2e345cd5
commit cba8e0cc5c
12 changed files with 25 additions and 37 deletions

View File

@@ -1,10 +1,11 @@
import cds from '@sap/cds'
////////////////////////////////////////////////////////////////////////////
//
// Mashing up bookshop services with required services...
//
module.exports = async()=>{ // called by server.js
export default async()=>{ // called by server.js
const cds = require('@sap/cds')
const CatalogService = await cds.connect.to ('CatalogService')
const ReviewsService = await cds.connect.to ('ReviewsService')
const OrdersService = await cds.connect.to ('OrdersService')