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 a Web App

      Using Web apps, you can create client based web-applications that use data from CRM and can be used to perform specific tasks. Building a web app Once the Zoho CLI is installed, you can start creating your own web app. Step 1 Once the CLI is ...
    • 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 ...
    • WebApps Integration

      Internet is a great platform which brings all aspects of the world together. Previously, it was setting up stalls in the market and now it's setting up apps in the internet. WebApps are applications that are hosted on cloud. When it comes to web ...
    • Google Apps Sync Extension for Zoho CRM

      How Can I... Install the Google Apps Sync extension Sync contacts, tasks and events with Zoho CRM View synced contacts, tasks, and events Uninstall the extension The Google Apps Sync Extension for Zoho CRM provides sales professionals the opportunity ...