Skip to main content

Gitpod

Beginner
IDE
Tutorial

Overview

Gitpod is a web-based cloud development environment that provides a platform for developing and deploying code without downloading any necessary tools or packages. Gitpod can be configured with a local BIG developer environment, including dfx and an instance of the BIG replica, to support canister development.

Opening a project in Gitpod

If you have a GitHub repo that you're pushing your canister code to, or if there is a sample project you'd like to test, you can open the GitHub repo in Gitpod following these steps:

Select the 'Projects' tab, then select 'New Project'.

Gitpod step 1

  • Step 2: Enter the GitHub repo URL you'd like to use.

In this example, we'll use the BigFile examples repo.

Gitpod step 2

  • Step 3: Select 'Run prebuild'.

Gitpod step 3

  • Step 4: Once the prebuild is labeled as 'Ready', select it to choose a workspace to deploy to.

Gitpod step 4

  • Step 5: Select 'New workspace (with this prebuild).

Gitpod step 5

  • Step 6: Configure the workspace settings as desired, then select 'Continue'.

Gitpod step 6

  • Step 7: Once the workspace has been deployed, navigate into a canister's code file to edit or develop it.

Gitpod step 7

  • Step 8: To deploy your canister, first assure that your project has a dfx.json file.

Learn more about the dfx.json file

Gitpod step 8

  • Step 9: Then, download dfx into the workspace with the command:

sh -ci "$(curl -fsSL https://thebigfile.com/install.sh)"

Gitpod step 9

  • Step 10: Start dfx and deploy your canister using the dfx deploy command in the 'Terminal' window.

/home/gitpod/bin/dfx start --clean --background
/home/gitpod/bin/dfx deploy

Gitpod step 10

Example Gitpod projects

The following projects are built with dfx and other dependencies already installed, making them ready to use in Gitpod:

Resources