cloud-cap-samples icon indicating copy to clipboard operation
cloud-cap-samples copied to clipboard

How to run embedded OrderService?

Open chgeo opened this issue 3 years ago • 1 comments

cds deploy excludes its definitions if OrdersService is marked as external, leading to exceptions in the UI.

How would we tell it to include them in the embedded case?

chgeo avatar Jul 13 '21 15:07 chgeo

Seems to be solved meanwhile. → running cds w fiori (or cds w bookstore) works as expected, with OrdersService being mocked:

[samples] cds w fiori
cd fiori

cds serve all --with-mocks --in-memory?
watching: cds,csn,csv,ts,mjs,cjs,js,json,properties,edmx,xml,env,css,gif,html,jpg,png,svg...
live reload enabled for browsers
[cds] - Loading server from { file: './fiori/server.js' }
[cds] - model loaded from 18 file(s):

  ./fiori/app/common.cds
  ./fiori/app/services.cds
  ./reviews/index.cds
  ./orders/index.cds
  ./bookshop/index.cds
  ./common/index.cds
  ./fiori/app/admin/fiori-service.cds
  ./fiori/app/browse/fiori-service.cds
  ./bookstore/srv/mashup.cds
  ./reviews/srv/reviews-service.cds
  ./orders/srv/orders-service.cds
  ./orders/db/schema.cds
  ./bookshop/db/schema.cds
  ./bookshop/srv/cat-service.cds
  ./bookshop/srv/admin-service.cds
  ./../../cds/common.cds
  ./orders/app/fiori.cds
  ./reviews/db/schema.cds

[cds] - connect using bindings from: { registry: '~/.cds-services.json' }
[cds] - connect to db > sqlite { database: ':memory:' }
 > filling sap.common.Currencies from ./common/data/sap.common-Currencies.csv
 > filling sap.common.Currencies.texts from ./common/data/sap.common-Currencies_texts.csv
 > filling sap.common.Languages from ./common/data/sap.common-Languages.csv
 > filling sap.common.Languages.texts from ./common/data/sap.common-Languages_texts.csv
 > filling sap.capire.orders.Orders from ./orders/db/data/sap.capire.orders-Orders.csv
 > filling sap.capire.orders.Orders_Items from ./orders/db/data/sap.capire.orders-Orders_Items.csv
 > filling sap.capire.bookshop.Authors from ./bookshop/db/data/sap.capire.bookshop-Authors.csv
 > filling sap.capire.bookshop.Books from ./bookshop/db/data/sap.capire.bookshop-Books.csv
 > filling sap.capire.bookshop.Books.texts from ./bookshop/db/data/sap.capire.bookshop-Books_texts.csv
 > filling sap.capire.bookshop.Genres from ./bookshop/db/data/sap.capire.bookshop-Genres.csv
 > filling sap.capire.reviews.Reviews from ./reviews/db/data/sap.capire.reviews-Reviews.csv
/> successfully deployed to sqlite in-memory db

[cds] - mocking ReviewsService { at: '/reviews', impl: './reviews/srv/reviews-service.js' }
[cds] - mocking OrdersService { at: '/orders', impl: './orders/srv/orders-service.js' }
[cds] - serving CatalogService { at: '/browse', impl: './bookshop/srv/cat-service.js' }
[cds] - serving AdminService { at: '/admin', impl: './bookshop/srv/admin-service.js' }

[cds] - server listening on { url: 'http://localhost:4004' }
[cds] - launched at 11/8/2021, 2:38:37 PM, in: 913.771ms
[cds] - [ terminate with ^C ]

danjoa avatar Nov 08 '21 13:11 danjoa