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:

copy
$
catalyst serve

The payslip generator application will now be served at default port 3000. The local endpoint URLs of the components will be displayed in the CLI. catalyst_payslip_catalyst_serve

Note:: Every time you access the home page or any of the sub-pages of your client, or the function, the CLI will display a live log of the URL accessed, along with the HTTP method that is used to access it.

You can now open the client component’s local URL in a browser to access the application.

catalyst_payslip_catalyst_serve_1

Add sample data in the form to test the functionality of the application, and click Submit.

catalyst_payslip_catalyst_serve_2

You will get a success prompt after the email is sent.

catalyst_payslip_catalyst_serve_3

Log in to the email account you had entered here, and you will find an email that contains the payslip as a PDF attachment.

catalyst_payslip_catalyst_serve_4

If you view the attachment, you will find the details you inputted in the form rendered in your custom template.

catalyst_payslip_catalyst_serve_5

Depending on the email provider you use, you will also be able to download and save the payslip.pdf document in your local system.

If the test run was successful, we can deploy the project to the console.


Last Updated 2023-12-15 18:54:08 +0530 +0530

RELATED LINKS

Serve CLI Resources