Skip to main content

Development Environment

Of all the ways to work with th.care, the easiest way to get started is to use GitHub Codespaces.

Codespaces

This is the easiest way to get started with th.care. Codespaces are a fully-featured development environment that is hosted in the cloud. They are powered by Visual Studio Code and are fully customizable. They are also ephemeral, meaning that they are created on demand and destroyed when you're done with them. This is a great way to get started with th.care, and you can use them for free for up to 20 hours per week.

Click on the Code button, then click on the "Open with Codespaces" button. This will create a new codespace for you and will take you to the Codespaces view. Once the codespace is created, you will be taken to the Codespaces view. From there, you can click on the "Open in VS Code" button to open the codespace in VS Code. You can also click on the "Open in Browser" button to open the codespace in the browser.

All the tools and configurations necessary to develop, test, and deploy your solution will be automatically available to you.

Local Devcontainer

NOTE: You will need to have Docker and VS Code, plus the Remote Containers plugin installed on your local machine to use this method.

Using essentially the same container as the codespace, you can run the solution locally using VS Code's Remote Containers extension. This will allow you to run the solution locally in a containerized environment that is nearly identical to the codespace. This is a great way to work with the solution locally, and it's free!

First, set up your THCARE_KEY environment variable. You'll need to get this from the th.care team. You can set it in your shell like this:

export THCARE_KEY="<your th.care npm identity token>"

In VS Code, you need to install the Remote - Containers extension. This will allow you to open the project in a dev container.

After checking out your repository and starting VSCode with THCARE_KEY set, open your repository root with VSCode. You will be prompted to reopen the solution in a container. Click on the "Reopen in Container" button. This will build the container and open the solution in the container. All the tools and configurations necessary to develop, test, and deploy your solution will be automatically available to you.

Local Development

Bring any IDE you choose, plus

  • Docker
  • NodeJS 18.x

You'll need to set up your THCARE_KEY environment variable, as in the Local Devcontainer setup above.