HomeEnvironment modules

Testing and Deploying Your Environment Module

Testing Options

After making desired changes to your environment module, testing on Naptha involves three main steps:

  1. Local testing without Node
  2. Testing on local Node with local Hub
  3. Testing on hosted Node with hosted Hub

1. Local Testing Without Node

The simplest way to test your environment module is to run the command in your terminal:

This allows you to iterate and make changes quickly.

Note: In order to test on a local or hosted node, you'll need to add version tags to your module and push them to your GitHub repository. You'll also need to update your deployment.json file with the latest configuration ensuring it has a name, description, parameters, module_type, module_version, module_entrypoint, and execution_type fields.

2. Testing on Local Node

This involves running your own Naptha Node and Hub locally. The module template readme has a Test the Module on a Local Node (with a Local Hub) section with the most updated instructions on how to do this.

3. Production Deployment

Register your module: Run the following command to register your module:

You can also run naptha environments which gives you a list of all your registered environment modules on the Naptha Hub.

You can then subsequently run your module using the Format: naptha run environment:<env_type> -p "<param_name>=<value>" command. For example: