Test the Application
Before you deploy the application to the remote console, you can test the application on a local server and check if everything works using the Catalyst CLI. For detailed information on catalyst serve, refer to the Serve Resources help page.
To serve the Catalyst project locally, execute the following command from your project directory:
The to-do list application will now be served at default port 3000. The local endpoint URLs of the components are displayed.
You can now open the client component’s local URL in a browser to access the application.
Let’s test the application by adding a task to the to-do list. Enter a task and click Create Task.
The task will be added and displayed in the app.
Let’s verify this. Open the TodoItems table in the Data Store from your Catalyst console.
Click the Data View tab to view the record. A row will be created for the list item that was added.
Let’s add a few more tasks to the to-do list app. We can now test the delete operation.
When you hover on a task, the delete-bin icon appears in the top-right corner. The delete operation is executed when you click the icon. The task will be removed from the list. The app displays the updated list.
Let’s verify if the record was deleted in the Data Store. Open the TodoItems table in the Data Store and click Data View to view the records. The row for the list of items will be deleted from the table.
If this setup is working correctly, we can deploy the application to production.
Last Updated 2024-06-12 17:41:34 +0530 +0530