Initialize the Project from the CLI

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 the Dialer application, we will initialize the client and the Advanced I/O function components.

  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. 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 CatalystDialerApp from the list and press Enter. select-project

  2. Select Client and Functions using the space bar. Press the Enter key to initialize. initialize-catalyst2

  3. The CLI will initiate the function setup. Select AdvancedIO as the function type.select-function

  4. Select the latest runtime version of node js platform listed. select-node-version

  5. Enter dialer as the package name, index.js as the entry point, and your email address as the author and press Enter. You can alternatively press Enter without entering inputs to fill in the default values. The CLI will prompt the initialization of the Node dependencies. Press Y to confirm the installation, and press Enter to confirm your choice. The Node modules will be installed.functions-setup-updated

The CLI will prompt the initialization of the Node dependencies. Press Y to confirm the installation, and press Enter to confirm your choice. The Node modules will be installed.

Note: Ensure that you enter the function's package name or class name exactly as instructed, because the application's code contains the same name.
  1. The CLI will now initiate the client set up next. Enter CatalystDialerApp as the name for the client package and press Enter. You can enter any name you need.
    client-setup

Catalyst initialization is now complete.

Your project directory (CATALYST_PROJECT_HOME), client directory (CATALYST_CLIENT_HOME), functions directory (CATALYST_FUNCTIONS_HOME) along with the configuration files and dependencies, catalyst.json and a hidden .catalystrc file will be created in a standard structure.

This is the structure of the CatalystDialerApp project’s directory with both the function and client directories configured. project-directory-structure

Last Updated 2023-12-14 16:25:23 +0530 +0530