diff --git a/.gitignore b/.gitignore index 2c0a106..fcb912f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules/ .vscode/ output dist/** +!dist/.keep diff --git a/README.md b/README.md index 60c62f9..6b98074 100644 --- a/README.md +++ b/README.md @@ -40,48 +40,48 @@ scp -r dist ibmuser@my.mainframe.com:/sample-node-api ## On Server ### 1) login -``` -ssh ibmuser@my.mainframe.com +``` +ssh ibmuser@my.mainframe.com ``` -### 2) install dependencies +### 2) install dependencies ``` -cd /sample-node-api -npm install --only=prod +cd /sample-node-api +npm install --only=prod ``` ### 3) Manage lifecycle of service with core zowe components -Use property `EXTERNAL_COMPONENT` located in file `$INSTANCE_DIR/instance.env` -Append it with your service lifecycle scripts. +Use property `EXTERNAL_COMPONENT` located in file `$INSTANCE_DIR/instance.env` +Append it with your service lifecycle scripts. -In our sample it is: +In our sample it is: ``` - vi INSTANCE_DIR/instance.env - EXTERNAL_COMPONENTS=/sample-node-api/bin + vi INSTANCE_DIR/instance.env + EXTERNAL_COMPONENTS=/sample-node-api/bin ``` We expect following in service folder `start.sh`, `configure.sh` and `validate.sh`. -In our case its bin folder with relevant scripts. - -`configure.sh` it adds static definition for sample-node-api to folder ${INSTANCE_DIR}/workspace/api-mediation/api-defs in IBM-850 encoding -`start.sh` starts node app on configured port -`env.sh` its custom script use to configure port for our node app, feel free to use your desired way +In our case its bin folder with relevant scripts. + +`configure.sh` it adds static definition for sample-node-api to folder ${INSTANCE_DIR}/workspace/api-mediation/api-defs in IBM-850 encoding +`start.sh` starts node app on configured port +`env.sh` its custom script use to configure port for our node app, feel free to use your desired way ### 4) Access newly deployed webservice -Please see static definition file `sample-node-api.yml` -It configures service endpoint as `sample-node-api` with property `serviceId` -We also provide api gateway base path `api\v1` with property `gatewayUrl` in same file. +Please see static definition file `sample-node-api.yml` +It configures service endpoint as `sample-node-api` with property `serviceId` +We also provide api gateway base path `api\v1` with property `gatewayUrl` in same file. -In effect, service can be accessed with following url: -`https://{host}:{GATEWAY_PORT}/{gatewayUrl}/{serviceId}/*` +In effect, service can be accessed with following url: +`https://{host}:{GATEWAY_PORT}/{gatewayUrl}/{serviceId}/*` -where `GATEWAY_PORT` is configured in $INSTANCE_DIR/instance.env +where `GATEWAY_PORT` is configured in $INSTANCE_DIR/instance.env -Verify by accessing following: -`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/` -`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/1/` -`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/1/cars/` +Verify by accessing following: +`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/` +`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/1/` +`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/1/cars/` diff --git a/dist/.keep b/dist/.keep new file mode 100644 index 0000000..e69de29