Building a To-Do List Application

Build a to-do list web application using Catalyst Advanced I/O Function and Catalyst Data Store that enables you to note down tasks to be done and delete them after they are done.

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 to-do list 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:
    $ catalyst init
  3. Select Client and Functions using the space bar. Press the Enter key to initialize.
  4. 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 ToDoList from the list and press Enter.
  5. The CLI will initiate the function setup. Select AdvancedIO as the function type.
  6. Select node10 as the function stack.
  7. Enter the "to_do_list_function" as the package name, "index.js" as the entry point, and your email address as the author and press Enter. 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 functions's package name exactly as instructed, because the application's code contains the same name.
  8. The CLI will initiate the client set up next. Enter "ToDoApp" as the name for the client package and press Enter. You can enter any name you need.

    The client directory will be created in the standard structure. Catalyst initialization is now complete.

The client directory (CATALYST_CLIENT_HOME) and the functions directory (CATALYST_FUNCTIONS_HOME) will be created in your project directory (CATALYST_PROJECT_HOME) with the configuration files and dependencies, along with the catalyst.json and a hidden catalyst.rc file.