After creating services in Node.js, you must zip (package) the project including services, and then publish the package to Node.js Runtime Server by using Kony Fabric Console.
To publish Node.js package, follow these steps:
The Logic page appears and lists services imported from a Node.js package (if any).
userpackage.zip
file and click Download.Node.js
package from your local system and drop it to the dialog. You can also click Browse to select the package through the Microsoft Windows Open dialog. In the Open dialog, locate your exported package (for example, USERAPP.zip file), and select it. Click Open. In the Import Node.js Package dialog, the selected files from the package are added to the dialog.While importing a package, if the existing package in Kony Fabric Console has the same name as the importing package, the system throws an error, shown below: The system overwrites the existing package with the data in the .zip file.
Important: While replacing a package, if the package names are same, the new data will override the existing data.
The selected package.zip is loaded into the Import Node.js Package dialog.
Click IMPORT. The services from the package are imported to the Logic tab.
After the Node.js package is imported into Kony Fabric Console, the following fields are displayed:
Number | Field | Description |
---|---|---|
1 | NODE.JS PACKAGES | Displays the imported package name. |
2 | RELATIVE PATH FOR SERVICES | Displays the relative paths of the imported services. |
3 | METHOD | Displays the method type of the service. |
4 | SECURITY LEVEL |
Displays the security level set in the swagger.json file for the service. You can set the security level for required relative path using For example: for the service.
The following security levels are supported.
To change the security level, follow these steps:
|
5 | Export Package | Allows you to export a package in a zip file. |
6 | Delete Package |
Allows you to delete a package. Important: You cannot delete a package if it is associated with any of the apps. |
7 | PACKAGE LAST UPDATED | Displays the date and time of Node.js package when last updated. |
8 | ASSOCIATED APPS |
Displays the View hyperlink. When you click the View link, the system displays the Associated Apps page. The Associated Apps page displays the number of apps associated with a particular service. For more details, refer to Associated Apps. |
9 | PUBLISHED STATUS |
Displays the View hyperlink. When you click the View link, the system displays the Environments dialog. The Environments dialog displays the names of the environments, publish status of the package, and runtime consoles associated with a particular Environment. |
After the Node.js package is imported into Kony Fabric Console, you can perform the following actions along with publishing the package.
Note: If a service is published or part of a published app, you can delete that service only after you unlink the service from all the published app.
The Node.js Package > Service Publish section appear with the list of Node.js Runtime servers configured for the Kony Fabric account. The list also displays the following Node.js package status for that Node.js Runtime Server environment.
Select the environment.
Click the PUBLISH button. The process of uploading the Node.js package to Node.js Runtime server begins.
Note: The PUBLISH button dims when you have not selected any Node.js environment. When an environment is selected, only then the PUBLISH button is available.
After the Node.js package is published to a Node.js Runtime Server, you can link the Node.js services to apps through the Apps > Logic tab. For details, refer to How to Integrate Node.js Services into Kony Fabric Apps.
After a Node.js package is published to Node.js Runtime Server, you can unpublish the package if required.
To unpublish a package from m Node.js Runtime Server, follow these steps:
Note: The UNPUBLISH button dims when you have not selected any Node.js environment. When a published environment is selected, only then the UNPUBLISH button is available.
Click the UNPUBLISH button. The process of unpublishing the Node.js package from the Node.js Runtime server begins.
Note: If a service is published or part of a published app, you can unpublish that package only after you unlink the service from all the published app.
Copyright © 2020 Kony, Inc. All rights reserved. |