You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -411,7 +406,7 @@ You have configured the access to your application. Follow the steps in the [Add
411
406
412
407
[OPTION BEGIN [Node.js]]
413
408
414
-
1. Open the **package.json** file and add the `"test": "jest tests/test.js"` line inside the `scripts` section. This adds a command to start the tests.
409
+
1. Open the **package.json** file and add the `"test": "npx jest tests/test.js"` line inside the `scripts` section. This adds a command to start the tests.
415
410
416
411
```json
417
412
{
@@ -428,7 +423,7 @@ You have configured the access to your application. Follow the steps in the [Add
Copy file name to clipboardExpand all lines: tutorials/deploy-to-cf/deploy-to-cf.md
+1-161Lines changed: 1 addition & 161 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,19 +60,12 @@ You will use the [Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-to
60
60
cds add mta
61
61
```
62
62
63
-
### Add configuration for SAP Build Work Zone, standard edition
63
+
### Check configuration for SAP Build Work Zone, standard edition
64
64
65
65
> You can create a CAP project in either Node.js or Java. You have to choose one way or the other and follow through. The tabs **Node.js** and **Java** provide detailed steps for each alternative way.
66
66
67
67
[OPTION BEGIN [Node.js]]
68
68
69
-
1. Run the following commandin the terminal:
70
-
71
-
```bash
72
-
cds add workzone-standard
73
-
```
74
-
75
-
76
69
2. Verify that the destinations module `incident-management-destinations` and resource `incident-management-destination` have been added to the **mta.yaml** file without errors:
77
70
78
71
@@ -147,119 +140,10 @@ You will use the [Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-to
147
140
forwardAuthToken: true
148
141
```
149
142
150
-
151
-
152
-
153
-
3. Verify that the navigation target `incidents-display` and the SAP Cloud service `sap.cloud` have been correctly added to the application manifest file **app/incidents/webapp/manifest.json**:
154
-
155
-
156
-
```json
157
-
"sap.app": {
158
-
"id": "ns.incidents",
159
-
...
160
-
"sourceTemplate": {
161
-
...
162
-
},
163
-
"dataSources": {
164
-
...
165
-
},
166
-
"crossNavigation": {
167
-
"inbounds": {
168
-
"incidents-display": {
169
-
"semanticObject": "incidents",
170
-
"action": "display",
171
-
"title": "{{flpTitle}}",
172
-
"subTitle": "{{flpSubtitle}}",
173
-
"signature": {
174
-
"parameters": {},
175
-
"additionalParameters": "allowed"
176
-
}
177
-
}
178
-
}
179
-
}
180
-
...
181
-
"sap.cloud": {
182
-
"public": true,
183
-
"service": "incidents"
184
-
}
185
-
}
186
-
```
187
-
188
-
189
-
4. Open **app/incidents/webapp/manifest.json** and remove the leading `/` from the `uri` parameter.
190
-
191
-
```json
192
-
{
193
-
"_version": "1.49.0",
194
-
"sap.app": {
195
-
"id": "ns.incidents",
196
-
"type": "application",
197
-
"i18n": "i18n/i18n.properties",
198
-
...
199
-
"dataSources": {
200
-
"mainService": {
201
-
"uri": "odata/v4/processor/",
202
-
"type": "OData",
203
-
"settings": {
204
-
"annotations": [],
205
-
"localUri": "localService/metadata.xml",
206
-
"odataVersion": "4.0"
207
-
}
208
-
}
209
-
},
210
-
...
211
-
},
212
-
...
213
-
}
214
-
```
215
-
216
-
This is needed as the dataSource URIs must be relative to the base URL, which means there is no need for a slash as the first character.
217
-
218
-
Check [Accessing Business Service UI](https://help.sap.com/docs/btp/sap-business-technology-platform/accessing-business-service-ui?locale=39723061bc4b4b679726b120cbefdf5a.html&q=base%20URL) for more information.
219
-
220
-
5. Make sure that the line `"welcomeFile": "/index.html"`in the following snippet is added to the **app/incidents/xs-app.json** file. Add if it is missing.
221
-
222
-
```json
223
-
{
224
-
"welcomeFile": "/index.html",
225
-
"authenticationMethod": "route",
226
-
"routes": [
227
-
{
228
-
"source": "^/?odata/(.*)$",
229
-
"target": "/odata/$1",
230
-
"destination": "incident-management-srv-api",
231
-
"authenticationType": "xsuaa",
232
-
"csrfProtection": true
233
-
},
234
-
{
235
-
"source": "^(.*)$",
236
-
"target": "$1",
237
-
"service": "html5-apps-repo-rt",
238
-
"authenticationType": "xsuaa"
239
-
}
240
-
]
241
-
}
242
-
```
243
-
244
143
[OPTION END]
245
144
246
145
[OPTION BEGIN [Java]]
247
146
248
-
1. Run the following commandin the root folder of your project:
249
-
250
-
```bash
251
-
cds add workzone
252
-
```
253
-
254
-
You should see the following output in the terminal:
255
-
256
-
```bash
257
-
Adding feature 'destination'...
258
-
Adding feature 'html5-repo'...
259
-
Adding feature 'workzone'...
260
-
Adding feature 'workzone-standard'...
261
-
```
262
-
263
147
2. Verify that all required modules (`incident-management-app-deployer`, `incidentmanagementincidents`, and `incident-management-destinations`) and resources (`incident-management-destination` and `incident-management-html5-repo-host`) have been added to the **mta.yaml** file without errors:
264
148
265
149
```yaml
@@ -365,50 +249,6 @@ You will use the [Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-to
365
249
service-plan: app-host
366
250
```
367
251
368
-
4. Open **app/incidents/webapp/manifest.json** and remove the leading `/` from the `uri` parameter.
369
-
370
-
```json
371
-
{
372
-
"_version": "1.49.0",
373
-
"sap.app": {
374
-
"id": "ns.incidents",
375
-
"type": "application",
376
-
"i18n": "i18n/i18n.properties",
377
-
...
378
-
"dataSources": {
379
-
"mainService": {
380
-
"uri": "odata/v4/processor/",
381
-
"type": "OData",
382
-
"settings": {
383
-
"annotations": [],
384
-
"localUri": "localService/metadata.xml",
385
-
"odataVersion": "4.0"
386
-
}
387
-
}
388
-
},
389
-
...
390
-
},
391
-
...
392
-
}
393
-
```
394
-
395
-
This is needed as the dataSource URIs must be relative to the base URL, which means there is no need for a slash as the first character.
396
-
397
-
Check [Accessing Business Service UI](https://help.sap.com/docs/btp/sap-business-technology-platform/accessing-business-service-ui?locale=39723061bc4b4b679726b120cbefdf5a.html&q=base%20URL) for more information.
398
-
399
-
6. Navigate to the **db** folder in the terminal and run the following command:
400
-
401
-
```bash
402
-
npm install
403
-
```
404
-
405
-
7. Navigate to the **app/incidents** folder in the terminal and run the following command:
@@ -562,7 +568,7 @@ Kyma runs on containers. Hence, for this tutorial, you'll need an application th
562
568
563
569
> The pack CLI builds the image that contains the build result in the **gen/srv** folder and the required npm packages by using the [Cloud Native Buildpack for Node.JS](https://github.com/paketo-buildpacks/nodejs) provided by Paketo.
0 commit comments