{"id":16163402,"url":"https://github.com/gregorwolf/cap-replication-demo","last_synced_at":"2025-09-07T21:03:55.855Z","repository":{"id":149536851,"uuid":"504404070","full_name":"gregorwolf/cap-replication-demo","owner":"gregorwolf","description":"Demonstrate replication with CAP","archived":false,"fork":false,"pushed_at":"2025-05-16T16:16:27.000Z","size":450,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-16T12:53:05.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregorwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-17T05:22:55.000Z","updated_at":"2025-05-16T16:16:31.000Z","dependencies_parsed_at":"2024-01-07T11:24:55.816Z","dependency_job_id":"a07e5752-1f71-41c1-9998-8baaa6a28782","html_url":"https://github.com/gregorwolf/cap-replication-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregorwolf/cap-replication-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fcap-replication-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fcap-replication-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fcap-replication-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fcap-replication-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorwolf","download_url":"https://codeload.github.com/gregorwolf/cap-replication-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fcap-replication-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274095419,"owners_count":25221433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T02:35:29.592Z","updated_at":"2025-09-07T21:03:55.819Z","avatar_url":"https://github.com/gregorwolf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demonstrate replication with CAP\n\n## Setup\n\n```\nnpm ci\n```\n\n## Start the application\n\nCreate a file `default-env.json` and add the following content and\n\n```JSON\n{\n  \"destinations\": [\n    {\n      \"name\": \"S4HANA_DEV\",\n      \"url\": \"http://localhost:4005\"\n    },\n    {\n      \"name\": \"S4HANA\",\n      \"url\": \"http://localhost:4005\"\n    }\n  ]\n}\n```\n\nFirst start the mock service for the Business Partner API:\n\n```bash\ncds mock API_BUSINESS_PARTNER --port 4005\n```\n\nThen start the CAP application:\n\n```bash\ncds w\n```\n\n## Test the application\n\nUse [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) to run the requests in the `test` folder. Start with bp-mock.http to check what data the mock service returns.\n\nNow you can test further with the requests in replication.http.\n\nWhen you have replicated the data from the source systems to the local database you can then run the upsert.http requests to merge the entries of the entity A_CustomerSalesAreaText from the source systems with the target system.\n\n## With Data from the api.sap.com Sandbox\n\nCreate a `.cdsrc-private.json` file with the following content:\n\n```JSON\n{\n  \"requires\": {\n    \"[hybrid]\": {\n      \"API_BUSINESS_PARTNER\": {\n        \"credentials\": {\n          \"headers\": {\n            \"APIKey\": \"\u003cYour-api.sap.com-API-Key\u003e\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nthen run:\n\n```\ncds watch --profile hybrid\n```\n\n## In hybrid mode with a real S/4HANA System\n\nCreate a file `default-env.json` and add the following content and\n\n```JSON\n{\n  \"destinations\": [\n    {\n      \"name\": \"S4HANA\",\n      \"url\": \"\",\n      \"username\": \"\",\n      \"password\": \"\"\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fcap-replication-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorwolf%2Fcap-replication-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fcap-replication-demo/lists"}