Initialize the Project from the CLI
After configuring the actions for a bot and coding the business logic for them, we will proceed to code the client application to embed the bot. We will be using the Catalyst Web Client Hosting component to host the client application in this tutorial.
In order to code the Catalyst functions, we will need to first initialize the project from the Catalyst CLI. The first step is to login to the CLI and initialize the project in an empty local 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 the project directory structure for all programming stacks supported by Catalyst from this page. You can learn about initializing a Catalyst project in detail from the CLI help documentation.
Please follow the steps listed below to initialize the project and create the required functions and client components:
-
Create a folder for the project on your local machine and navigate to it from the CLI terminal.
-
To initialize the project, please execute the following command:
- The CLI will now ask you to select the default Catalyst organization. Select the organization in which you created the project in the first step of this tutorial and press Enter.
-
You can associate the current project directory with the Catalyst project you created in this organization. Select Ecommerce and press Enter.
-
Select the components that you need to set up for your Catalyst application. Navigate through the options using the arrow keys and select them by pressing space bar. Select Client and press Enter to confirm your choice.
-
The CLI will initiate the client setup next. Select Basic web app as your client type.
- Enter ecommerceclient as the name of the client package and then press Enter. You can enter any name you need.
The client directory will be created in the standard structure and will look like this :
Catalyst initialization is now complete. The project directory will contain the client and other project dependency files.
Last Updated 2023-12-15 18:54:08 +0530 +0530