Initialize the Project

You can now begin working on your Catalyst project from the CLI. The first step is to initialize the project in an empty directory. This will be the home directory of your project, and all of the project files will be saved in it.

You can learn more about this from the Project Directory Structure help page. You can learn about initializing a project in detail from the CLI help documentation.

For this application, you will be initializing the AppSail component alone. The AppSail component will be initialized in the Node.js programming stack.

  1. Create a folder for the project on your local machine and navigate to it from the terminal.

  2. Initialize a project by executing the following command from that directory:

copy
$
catalyst init
  1. Navigate using the arrow keys and select your preferred portal and click Enter. If you have no other organizations associated with the account, then the default will be selected automatically. catalyst_tutorials_leadmanager_appsail_catalyst_init
Info: You can find out more about Catalyst’s multi-org portal feature in this help document.
  1. The CLI will now ask you to associate a Catalyst project with the directory. Associate it with the project that we created earlier from the console. Select LeadManager from the list and click Enter. catalyst_tutorials_leadmanager_appsail_cli_proj_sel

  2. Select AppSail using the space bar, then click Enter to initialize. catalyst_tutorials_leadmanager_appsail_sel_appsail

  3. The CLI will initiate the AppSail service.

    • As you are creating your own project, enter “n” and click Enter for the prompt asking if you wish to get started with a list of recommended projects. catalyst_tutorials_leadmanager_appsail_appsail_start_cli
    • Enter “Y” in the prompt to initialize the AppSail service in your current directory. catalyst_tutorials_leadmanager_appsail_appsail_process_cli
  4. Enter “LeadManagerApp” as the name of your AppSail service, and enter your project directory path as the build path of your AppSail service. catalyst_tutorials_ledmanager_appsail_pwd_for_appsail

  5. Choose the latest runtime of Node.js as the programming stack, and click Enter. catalyst_tutorials_leadmanager_appsail_runtime_sel_cli
    The AppSail service has been initialized for your Lead Manager application catalyst_tutorials_leadmanager_appsail_init-complete

The directory will be created in the standard structure, and it will contain the app-config.json file which includes the configuration of your AppSail service , along with the standard project configuration files such as the catalyst.json file and a hidden .catalystrc file.

This is the structure of the LeadManager project’s directory initialized with the AppSail service. catalyst_tutorials_leadmanager_appsail_first_dir

Deploy the Application

You need to deploy the application to the console to fetch the required application URL. We need this URL when we register the client in the Zoho API console to get the required Client ID and Client Secret values.

Info: We will be re-deploying the application service once we have completed coding and adding the Client ID and Client Secret values to the application.

Enter the following CLI command to deploy the application:

copy
$
catalyst deploy

Now, to acquire the application URL:

  1. Navigate to the AppSail component present under the COMPUTE section of the Catalyst Serverless section of the console. catalyst_tutorials_leadmanager_appsail_nodejs_first_deploy
    You will be able to view that your application has been deployed as an AppSail service.

  2. Now click your AppSail service, and you will be able to view the application URL. catalyst_tutorials_leadmanager_appsail_appsail_invocation_url

Info: We will discuss more about the catalyst deploy CLI command and the AppSail service, after we re-deploy the application, towards the end of the tutorial.

Last Updated 2025-01-31 19:19:27 +0530 +0530