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, where all of your project files are saved.
For the Lead Manager application, we will initialize the Advanced I/O function in the Java or Node.js environment, and the client component.
- Create a folder for the project on your local machine and navigate to it from the terminal.
- Initialize a project by executing the following command from that directory:
$ catalyst init
- Select Client and Functions using the space bar. Press the Enter key to initialize.
- 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 press Enter.
- The CLI will initiate the function setup. Select AdvancedIO as the function type.
- Select java8 or node10 based on your requirements as the function stack, and press Enter.
- If you select java8, enter "crmCRUD" as the folder name and "CRMCRUD" as the class name. Press Enter each time.
The CLI will download and install the latest Catalyst Java SDK package on your local system.
If you select node10, enter "crm_crud" as the package name, "index.js" as the entry point, and your email address as the author and press Enter each time. You can press Enter to fill 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.
Note:Ensure that you enter the package name, or class name and folder name, exactly as instructed, because the application's code contains the same names.
- The CLI will initiate the client set up next. Enter "LeadManagerApp" as the name for the client package and press Enter.
You can enter any name you need. However, you can use the same name that you used while enabling Zoho sign-in to maintain standardization.
The client directory will be created in the standard structure. Catalyst initialization is now complete.
Your project directory (CATALYST_PROJECT_HOME) is now set up with the client directory (CATALYST_CLIENT_HOME) and the functions directory (CATALYST_FUNCTIONS_HOME) along with configuration files and dependencies. The functions directory contains either the Java or Node.js function. The project directory also contains the catalyst.json configuration file and a hidden catalyst.rc file.
This is the structure of your project directory, if the Advanced I/O function is of the Java platform.
This is the structure of your project directory, if the Advanced I/O function is of the Node.js platform.