Skip to content

Commit d4afe6d

Browse files
committed
Add step to view application output files
Signed-off-by: Mark Cocker <[email protected]>
1 parent 7fc8f18 commit d4afe6d

File tree

1 file changed

+38
-21
lines changed

1 file changed

+38
-21
lines changed

docs/pages/cdp/cdp-Deploying-your-first-nodejs-app.md

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CICS TS V5.5 introduced support to run Node.js applications and is required by t
2121

2222
3. Create a Node.js application using the [Express Application Generator](https://expressjs.com/en/starter/generator.html):
2323

24-
```console
24+
```text
2525
npm install -g express-generator
2626
express myExpressApp
2727
cd myExpressApp
@@ -33,41 +33,58 @@ CICS TS V5.5 introduced support to run Node.js applications and is required by t
3333

3434
4. Package the Node.js application into a [CICS bundle](cdp-cics-bundles).
3535

36-
Make sure that you are in the root directory of the application.
36+
Make sure that you are in the root directory of the application.
3737

38-
Replace the value for `--port` with one that is available for use by the CICS region on z/OS. This sets the PORT environment variable in the generated `.profile` file. Additional variables can be set by editing this file.
38+
Replace the value for `--port` with one that is available for use by the CICS region on z/OS. This sets the PORT environment variable in the generated `.profile` file. Additional variables can be set by editing this file.
3939

4040
```console
4141
zowe cics-deploy generate bundle --port 3000 --overwrite
4242
```
4343

44-
The output indicates the directories and files that are created to form a CICS bundle. For example:
44+
The output indicates the directories and files that are created to form a CICS bundle. For example:
4545

46-
<pre class="messageText">
47-
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
48-
create : nodejsapps
49-
create : nodejsapps/myexpressapp.nodejsapp
50-
create : nodejsapps/myexpressapp.profile
51-
create : .zosattributes
52-
create : META-INF
53-
create : META-INF/cics.xml
54-
CICS Bundle generated with bundleid "myexpressapp"</pre>
46+
<pre class="messageText">
47+
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
48+
create : nodejsapps
49+
create : nodejsapps/myexpressapp.nodejsapp
50+
create : nodejsapps/myexpressapp.profile
51+
create : .zosattributes
52+
create : META-INF
53+
create : META-INF/cics.xml
54+
CICS Bundle generated with bundleid "myexpressapp"</pre>
5555

5656
5. Deploy the CICS bundle into CICS.
5757

58-
```console
59-
zowe cics-deploy push bundle --name Express --overwrite
60-
```
58+
```text
59+
zowe cics-deploy push bundle --name Express --overwrite
60+
```
61+
62+
A progress bar is shown with status messages as the CICS bundle is deployed and the application is started. This can take a few minutes. The command will summarise the deployment, including the Node.js runtime `.stdout` and `.stderr` file names that the application will write output to:
63+
64+
<pre class="messageText">
65+
Regions in scope 'CICPY000' of CICSplex 'ZOSPTINT':
66+
Applid: CICPY000 jobname: CICPY000 jobid: STC35860 sysname: MV2C</br>
67+
NODEJSAPP resources for bundle 'Express' in scope 'CICPY000':
68+
NODEJSAPP resource 'Express' is in 'ENABLED' state in region 'CICPY000' with process id '16844444'.
69+
stdout: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout
70+
stderr: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stderr
71+
PUSH operation completed</pre>
6172

62-
A progress bar is shown with status messages as the CICS bundle is deployed and the application is started. This can take a few minutes. If there are errors, retry with the `--verbose` option for more detailed output, or refer to [Troubleshooting](cdp-Troubleshooting-General).
73+
This results in a CICS BUNDLE resource named `Express` being defined, installed, and enabled in CICS. If the BUNDLE `Express` was already defined or installed in CICS, it is undeployed first. As the BUNDLE is enabled, the application is started. If there are errors, retry with the `--verbose` option for more detailed output, or refer to [Troubleshooting](cdp-Troubleshooting-General).
6374

64-
This results in a CICS BUNDLE resource named `Express` being defined, installed, and enabled in CICS. If the BUNDLE `Express` was already defined or installed in CICS, it is undeployed first. As the BUNDLE is enabled, the Node.js application is started.
75+
6. Test the application.
6576

66-
6. Test the Node.js application.
77+
You can call the application from a browser by using URL [http://myzos:3000/](http://myzos:3000/), replacing _myzos_ with the host name of the z/OS system, and _3000_ with the port specified in step 4.
6778

68-
You can call the application from a browser by using URL [http://myzos:3000/](http://myzos:3000/), replacing _myzos_ with the host name of the z/OS system, and _3000_ with the port specified in step 4.
79+
If you make changes to the application, you can redeploy it by repeating step 5.
6980

70-
If you make changes to the application, you can redeploy it by repeating step 5.
81+
7. View the application output files.
82+
83+
Use Zowe CLI commands or the Visual Studio Code extension to view the application output files, for example:
84+
85+
```text
86+
zowe zos-uss issue ssh "tail -f /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout"
87+
```
7188

7289
### Results
7390

0 commit comments

Comments
 (0)