SAP CAP Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
qmacro
Developer Advocate
Developer Advocate
1,594

When embracing local-first development and using cds watch, we're actually using a convenience shortcut for:

cds serve all --with-mocks --in-memory?

That --with-mocks option for cds serve is described thus:

--with-mocks

  Use this in combination with the variants serving multiple services.
  It starts in-process mock services for all required services configured
  in package.json#cds.requires, which don't have external bindings
  in the current process environment.
  Note that by default, this feature is disabled in production and must be
  enabled with configuration 'features.mocked_bindings=true'.

Details of services that are provided by such server processes (or servers involved explicitly via cds mock, which is essentially another convenience shortcut for cds serve --mocked ...) are written to a special binding file which is for local-development only.

This binding file, also referred to as the "registry", is also read by other local server processes which require services, to see what's already available.

Technically the use of the bindings file is from --with-bindings which is described thus:

--with-bindings

  Use this option in local tests, to have all services provided by a
  process registered with their physical urls in a temporary file.
  All required services are bound automatically upon bootstrapping.
  Option --with-mocks subsumes this option.

i.e. if --with-mocks is used, then --with-bindings is implicit.

We can tell that this registry is for local-development just by looking at the file's location and name. Its location is in the developer user's home directory (very un-cloud-like), and its name starts with a dot (.), indicating it's a hidden file.

What is this file's name (don't include any directory prefix parts to it)?

This is a question from the June Developer Challenge on CAP Knowledge. And don't forget: always submit your answer as a hash, on its own - read the Taking part section of the intro post for more info. At the end of today, this question will be updated with links to further reading on this topic.

Further info:

31 Comments
furkan5
Participant
0 Likes

b7c8439246c8b3894b26b9dabea256dc0bb325e369f7abb725f4c707401f9b96

sarvesh_agarwal
Explorer
0 Likes
94566f3c5f7d4e19dc22a9ddb0b9789725084dec09f901f97d806a7792380d22
aelghannam
Participant
0 Likes

76dfe2ce4415a1ddf57b5404769ab5fd112d1718314f67ef8b886609e71f69c3

NakulG
Explorer
0 Likes

f668006222be1b8c01e0c59e82f5c47a8be84b0fa3420de0cdc20324214505e9

VishnAndr
Active Contributor
0 Likes

4510b169eb1e279a0cb49ac196c6a05b184477052e0ed221535643391819fe83

kasch-code
Participant
0 Likes

d813d6eaec7d939e60e309227f0a2e6160b60e208f95498d62dd21d6a9a3e38a

Joery
Participant
0 Likes

73c6937e205e2ff2f7e69d727ed1784eea0bee5ad0d56064051736fd6be27b8a

mvaibhav
Contributor
0 Likes

bc57a04bcb84696de834f0af27e13c15d0ef5367d890a14b9ad0c1cffe9b8fa2

lidavidlee
Explorer
0 Likes

ff2b8b4033a3a20fc9ecfccd7fd6c843d78f2c66338006462159603818032135

soheil_st
Explorer
0 Likes

9349d3dcf970262ec4417cea1265246b31c537bc1fef785447e8a180a1e1eb74

Raphael
Explorer
0 Likes

d7b67fbe9c254273dc11ab0ed00ef93c6cfae5b14aa08f1f8f49c9ef8594ba34

SachinArtani
Active Participant
0 Likes

6b166c3625ef630522327ffda963b04dbdc184f504856ab427c153733e3e42e9

0 Likes

5c31f446722b736689bdac2e90cd578e3d99208d11083b8c888441a449d51f8e

parthasaradhi
Explorer
0 Likes

a3bffc825d939fae237289469c83e02452361a7001c80b938b3bed6215af4d97

berkaydurmaz
Explorer
0 Likes

c80c6da00393c18e594b39abfe9b14b94f6dfd79327fab7a5c64ff565821d6fd

Rupesh_Kumar25
Explorer
0 Likes

06b7d4d8a08da06b9831bba76e3c364d7dee1572079b5d05da5f0d83e9faccd6

Chaimae_Chairi27
Participant
0 Likes

0d222dffdc7027d79e1f2aa2c82c21d9a897a3348483799572647e0e7b8de77e

MioYasutake
SAP Champion
SAP Champion
0 Likes

a88ade4ab3cda95b95fe2a79c602d9caa7058bf561e01e9941ce13dc7c728cd2

Caisi
Explorer
0 Likes

1ba714944cda439b915df41ebca66101dacacdddf92f9e0998c4583c2bd1eff7

MatLakaemper
Participant
0 Likes

075e153724c42f468774626124afdb2e3b4cc2922d4a2e0936c5a805ee889731

Swathi_SAP_Philomath
Participant
0 Likes

0b210d2e818161a8643f8aec07cdf7888239e4f3032eb022eed971860352d7e6

nagarjundas_1994
Explorer
0 Likes

7a1fad1d203c65a7338a418eb90c18f9a99c6f3cbb602b94c3c9af0c26f3fce6

shotokka
Explorer
0 Likes

3f2f9ba7e4ec91af27f10d2172f558d9ce6f4683d5916f3bc98f9a9055bd350b

ajmaradiaga
Developer Advocate
Developer Advocate
0 Likes

b819362a85647c004723cf9cdc0c59f728fcab4ef66bf285b81f3c04423e27cd

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Likes

d80bac9c31344b23c3b2135edb1495adde9a0ac220d7f937ccef6e87899602be

SergioG_TX
SAP Champion
SAP Champion
0 Likes

6895f3138f47c2a50ed89f7e4a11bf42b46723d8ad8c8da38185821981ca4c4c

Laco
Participant
0 Likes

57a645c6a3396ce0c7e369ef2d115aec07e1ca7ef49d446b0eedef90612c2e2c

Anusha2025
Explorer
0 Likes
9fc7fda0dd1d4a9ccbaabf311c291743a73babdad814d5651fe7ddea2e7151b5
Andrii
Participant
0 Likes

4e1f46edcff7494f56f9cabf2a87a142335087aa4682ddfa294292dd5e2c1f73

stickman_0x00
Participant
0 Likes

f534cdffe539206b342b8bb3d6ddbe4378349a37f01e180e6728253ced85fdf0

gouthamKumar
Explorer
0 Likes

eb68f55f5cba4f7ceffba8b3deff65d478fed125287518697ffe71eafb38d78f