Skip to content

Take the quickstart from an empty folder to a data app - #27

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/vigilant-sagan-d48gch
Sep 27, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/vigilant-sagan-d48gch

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Completes guide/getting-started so a beginner gets from an empty folder to a working data app, with the depth in ::: details blocks and on the pages it belongs to.

Quickstart (guide/getting-started.md)

  • Checks before you start: node -v (22+) and cds version (@sap/cds-dk (global) 10.x)
  • Optional sanity check before the plugin: cds watch, then the index page lists /odata/v4/catalog with Books
  • Creating srv/apps/hello.js in VS Code (New File… → apps/hello.js) or a terminal (mkdir srv/apps / mkdir srv\apps)
  • Tip: a redirect in app/hello/index.html lists the app on CAP's index page. This only works after a restart: a new app/ folder triggers no restart, so /hello/ answers 404 until then.
  • "Reading your own data" is now a complete BOOKS app that runs as-is in the tiny-sample project. It replaces the fragment that read my.bookshop and a price column the project doesn't have.
  • What is in the database: a short section that links to the persistence page
  • Troubleshooting table that links to guide/troubleshooting
  • Next steps now include reference/deployment (HDI table, approuter route)

Persistence (guide/persistence.md)

New section "The database in development":

  • where the tables come from (all loaded .cds files, no db/ needed) and where the rows come from (CSV by file name; one draft per roundtrip)
  • cds compile "*" --to sql and cds repl --run .
  • keeping data across restarts with db.sqlite + cds deploy: re-deploying deletes drafts, and *.sqlite is already in .gitignore
  • a link to the SQLite busy-timeout note

Troubleshooting (guide/troubleshooting.md)

  • New Setup problems section covering: cds not found (plus the PowerShell execution policy), EACCES on npm i -g, port 4004 in use, and the login prompt
  • NO_DRAFT_ENTRY… now lists "the server restarted" as its most common cause

Verification

Measured with cds-dk 10.1.0, @sap/cds 10.1.1, cap2ui5 0.1.0 and Node 22 in a fresh cds init --nodejs --add tiny-sample project:

  • BOOKS app, over HTTP roundtrips: the start returns 5 rows; SEARCH for "Raven" returns 1 row and the toast "1 found". Saving the file restarts cds watch, which prints the BOOKS line.
  • Browser: not tested. sdk.openui5.org is blocked by this environment's network policy.
  • cds repl: after the start and one click it shows 2 draft rows owned by alice, and data contains <COUNT>1</COUNT>.
  • File-backed SQLite: a draft continues after a restart, and after a re-cds deploy it answers NO_DRAFT_ENTRY….
  • Port in use: prints [EADDRINUSE] - port 4004 is already in use by another server process., and --port 4005 works.
  • Index-page redirect: 404 and "none" before a restart; listed and served after it.
  • Correction to the brief: mocked auth accepts any user and password (only no credentials gets a 401). So the docs say to log in as alice and don't claim that other names are refused.
  • npm run check:ci passes with both sibling checkouts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y47xEWed2qwpona5WWpt4B


Generated by Claude Code

- Prerequisite checks: node -v (22+), cds version (cds-dk 10.x)
- Optional sanity check of the tiny-sample project before the plugin
- How to create srv/apps/hello.js in VS Code or a terminal
- Replace the "Reading your own data" fragment with a complete BOOKS app
  that runs as-is in the tiny-sample project (search "Raven" leaves 1 row)
- Tip: a redirect under app/ lists the app on CAP's index page, after a restart
- Short "What is in the database" section, with the depth on the persistence
  page: where tables and rows come from, cds compile, cds repl, and a
  file-backed SQLite that survives restarts
- Troubleshooting table in the quickstart; setup problems (cds not found,
  PowerShell execution policy, EACCES, port in use, login) and the
  restart case of NO_DRAFT_ENTRY in guide/troubleshooting
- Next steps point at reference/deployment

All steps measured with cds-dk 10.1.0, @sap/cds 10.1.1 and cap2ui5 0.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y47xEWed2qwpona5WWpt4B
@oblomov-dev
oblomov-dev merged commit 5670940 into main Sep 27, 2026
1 check passed
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.

2 participants