Developing Locally

Fusebit's web-based Editor is convenient when getting started and when you want to experiment and make quick fixes. However, if you want to use your local editor or IDE, we have you covered! Fusebit provides a command-line tool (Fusebit CLI) that lets you pull code down locally and deploy it when you've made your changes. This also enables source control via git, as well as CI/CD workflows.

Editing Integration code

  1. Ensure you have a recent version of Node.js on your system and then run
npm i @fusebit/cli -g
  1. After the Fusebit CLI is installed, run the following. Log in with the same account you use for the Fusebit Management Portal
fuse init
  1. You can now download the code for an integration. Replace {name} with the integration name from the Portal and {directory} with the folder name where you want the files downloaded.
fuse integration get {name} -d {directory}
  1. You can now explore the code in the given directory and make any changes with your favorite editor or IDE. At present, the code cannot be executed locally, so running npm install is not necessary.
  2. After making local changes to the code, you can push the updates to Fusebit's cloud by running
fuse integration deploy {name} -d {directory}

Running your Integration

To run the Integration and test as you make changes, follow these steps:

  1. (Development-time only) The integration needs to know the Identity of the user on whose behalf to execute. In production, this will be handled by your application, but for test purposes, you can log in as yourself manually by running
fuse integration test {name}

You will be asked to log in, and the integration will act on your behalf going forward.

  1. Note the curl command and JavaScript example displayed by the test application from the previous step and use that to invoke the integration. If your token expires, you can always obtain a new one by opening up the test application again as described in the previous step, or by generating a new access token directly by running fuse token -o raw.

Debugging your Integration

After you make a code change and run the Integration, you can inspect console output and any errors by running:

fuse integration log {name}

Whatโ€™s Next
Did this page help you?