Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run embedded OrderService? #252

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

How to run embedded OrderService? #252

wants to merge 1 commit into from

Conversation

chgeo
Copy link
Member

@chgeo chgeo commented Jul 13, 2021

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?

cds deploy excludes its definitions if `OrdersService` is marked
as external.  How would we tell it to include them in the embedded case?
@chgeo chgeo requested a review from danjoa July 13, 2021 15:03
@danjoa
Copy link
Member

danjoa commented Nov 8, 2021

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 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants