GitHub Codespaces is a cloud-based development environment that allows you to run your code directly from within GitHub. It provides a fully-featured, configurable, and on-demand development environment that can be accessed from anywhere. With GitHub Codespaces, you can:
- Develop in a consistent environment across different machines.
- Quickly start coding without setting up your local environment.
- Use powerful cloud-based resources for development.
Follow these steps to spin up a Codespace instance using the devcontainer
file:
- Go to your repository on GitHub. In this case, navigate to qldgov-sandbox/copilot-node-calculator.
- Click on the
Code
button on the repository page.
- Select the
Codespaces
tab.
- Click on
New codespace
to create a new Codespace.
-
GitHub Codespaces will automatically detect the
devcontainer.json
file in your repository and use it to set up your development environment. -
Wait for the Codespace to start. This might take a few minutes as it sets up the environment according to the configurations specified in the
devcontainer.json
file.
- Once the Codespace is ready, you will be taken to a VS Code-like interface in your browser. You can now start coding in the environment that has been set up according to your
devcontainer.json
file.
- You can access the terminal by clicking on the menu and selecting
View > Terminal
.
- Use the terminal to run commands, install dependencies, and test your code.
- You can customize your development environment further by modifying the
devcontainer.json
file. - Codespaces supports extensions, themes, and other VS Code features, which you can install to enhance your development experience.
GitHub Codespaces provides a powerful and flexible development environment that you can access from anywhere. By following the steps above, you can quickly spin up a Codespace instance and start coding using the devcontainer.json
file you created.