Serve Resources

Introduction

Catalyst CLI allows you the convenience of testing your project resources locally before deploying them to the remote console. You can serve the resources through a localhost in your system for testing without affecting the live version of your application.

You can serve these components of your project through the local server: Basic I/O functions, Advanced I/O functions, Browser Logic Functions, AppSail apps, Angular web apps, React web apps, and Basic web apps.

Note: Catalyst will not be able to serve functions of the other types, i.e., Cron, Event, and Integration functions, as their endpoints are not directly accessible through URLs.

The serve command also enables you to start a local server from any port, or start the server in a debug mode to analyze the execution of your code in detail. You can test specific targets of your project, proxy unknown requests to the local host URL, or ignore lifecycle scripts. All these actions can be performed using the various options available for the serve command.

Note:
  • You can also launch a node shell exclusively to test and debug functions of all types except the Advanced I/O functions. To learn more about this, refer to the Working with Functions help page.
  • The functions and the client packages can be served successfully only if their directories are in the standard structures. The directories must contain the required configuration files in the standard format. For more information, refer to the Project Directory Structure help page.
  • To serve an AppSail app, you will need to have initialized an AppSail resource either during the project initialization or by adding it in an existing project directory.
  • If you are a Visual Studio Code IDE user, you can install the Catalyst Tools extension, and perform CLI operations using your IDE in place of the CLI. Steps to serve your Catalyst resources using Visual Studio Code IDE can be found here.

Last Updated 2024-01-09 17:07:13 +0530 +0530

ON THIS PAGE