diff --git a/node.js/cds-facade.md b/node.js/cds-facade.md index dc2b9b095..7d67896a4 100644 --- a/node.js/cds-facade.md +++ b/node.js/cds-facade.md @@ -291,7 +291,8 @@ Provides access to common event context properties like `tenant`, `user`, `local The effective [CDS model](../cds/csn) loaded during bootstrapping, which contains all service and entity definitions, including required services. Many framework operations use that as a default where models are required. It is loaded in built-in `server.js` like so: ```js -cds.model = await cds.load('*') +const csn = await cds.load('*') +cds.model = cds.compile.for.nodejs(csn) ``` [Learn more about bootstrapping in `cds.server`.](./cds-serve){.learn-more} diff --git a/node.js/core-services.md b/node.js/core-services.md index db5edaef3..e7e45a2c3 100644 --- a/node.js/core-services.md +++ b/node.js/core-services.md @@ -44,7 +44,8 @@ In essence, the built-in bootstrapping logic works like that: ```js cds.app = require('express')() -cds.model = await cds.load('*') +const csn = await cds.load('*') +cds.model = cds.compile.for.nodejs(csn) cds.services = await cds.serve('all').from(cds.model).in(cds.app) ```