Install CLI - Web Apps

Install CLI - Web Apps

Installation of necessary components

Pre-requisites

  1. Download the nodejs source code from "https://nodejs.org/en/download/".
  2. Once Node is installed, verify it by running the following command.
  1. $ node -v
  2. $ npm -v

CLI Installation

Run the following command to install the zet CLI node package.

  1. $ npm install -g zoho-extension-toolkit

Note

  • Use sudo before executing the command if you don't have permission to install the tool.
  • -g option makes sure that, the module is installed globally. hence, the CLI command can be accessed anywhere.

Run the following command to ensure that the installation is successful.

  1. $ zet // Help information about 'zet' command will be shown.

Create a project

Run the following command to create new project.

  1. $ zet init

This command will show the list of Zoho Services for which you wish to create project template. Select Catalyst as the service.

To verify whether the server is started successfully, open the following URL in the browser http://localhost:5000/plugin-manifest.json or http://localhost:5000/app/app_file.html

Include Resources

All the files that are required for rendering your web app appears inside the "app" folder of your project.

Starting the Server

To start a local HTTP server that allows to run your app locally and to test it in your sandbox instance, run the following command,

  1. $ zet run

This will run the HTTP server in your local machine in the port number 5000. The port should not be occupied with any other process before starting the server.

To verify whether the server has started successfully, open the following URL in your web browser:
http://127.0.0.1:5000/app/app_file.html

Validation and Packaging the Web app

When we run the below command, it will validate the application source to make sure it follows the guidelines provided in the section <>.

  1. $ zet validate

This will provide the validation result. We need to fix if there is any validation errors mentioned. Without fixing the validation issues, the app can not be uploaded in the Zoho developer console since the same code check will happen when we upload the application in zet service.

Packaging

The project folder which you are working on contains the app sources also some node modules which is needed for local testing. When you upload the app in Zoho marketplace, make sure that the zip includes only the application's relevant files & folders.

  1. $ zet pack

To make packaging easy, a command called 'pack' which will create a zip file with app relevant files alone (excluding node module related files), is provided. This zip is now ready to be uploaded.



    • Related Articles

    • Install CLI - Widgets

      Zet is a command line interface that helps developers build and package widgets in Zoho CRM. CLI is Command Line Interface, which is a text-based interface that is used to operate softwares by typing commands into the interface and receiving a reply ...
    • Create extensions using Command Line Interface(CLI)

      Zoho Sigma helps you to build extensions for Zoho services in two ways:  Building apps using the command line interface (CLI). You can use this method if you want to build an extension offline with your own code editor. Use Zoho Sigma cloud editor ...
    • Web Apps Development - An Overview

      Although a CRM provides a platform to run your business online, there are a lot of other avenues where your business might have to tread on. Some of them would be building a custom mobile or web application. Upon integration, the functionality of ...
    • Adding Apps - Overview

      Zoho One supports adding and managing three different types of apps: Zoho apps These are the standard apps that came bundled with your Zoho One subscription. Marketplace apps These are Creator custom apps and single sign-on (SSO) connectors for apps ...
    • Google Apps Sync

      The Google Apps Sync Extension for Zoho CRM provides sales professionals the opportunity to easily access their Gmail contacts, tasks, and Google calendar events within Zoho CRM. Note: Only administrators can install this extension. Users with a ...