|
| 1 | +--- |
| 2 | +id:env-vars |
| 3 | +title:Environment Variables |
| 4 | +sidebar_label:Env Variables |
| 5 | +--- |
| 6 | + |
| 7 | +##Variables |
| 8 | + |
| 9 | +CodeRoad has a number of configurations: |
| 10 | + |
| 11 | +-`CODEROAD_DISPLAY_RUN_TEST_BUTTON` - show the "Run" button on the tutorial page. Defaults`true`. |
| 12 | + |
| 13 | +-`CODEROAD_DISABLE_RUN_ON_SAVE` - stop running tests whenever a file is saved. Defaults`false`. |
| 14 | + |
| 15 | +-`CODEROAD_TUTORIAL_URL` - pass in a url path to a`tutorial.json` file. The tutorial will launch on startup. This is a way to create one-click tutorial experiences for web or locally. Defaults`null`. |
| 16 | + |
| 17 | +-`CODEROAD_ADMIN_MODE` - a mode for tutorial developers. Under the "Review" page, you can jump around between levels & steps to test development. Defaults`false`. |
| 18 | + |
| 19 | +##How to Use Variables |
| 20 | + |
| 21 | +###Local |
| 22 | + |
| 23 | +Launch the code editor with the environmental variables. |
| 24 | + |
| 25 | +```shell |
| 26 | +CODEROAD_ADMIN_MODE=true code. |
| 27 | +``` |
| 28 | + |
| 29 | +Note that this requires the[VSCode CLI](https://code.visualstudio.com/docs/editor/command-line). |
| 30 | + |
| 31 | +###Web / Virtual Machine |
| 32 | + |
| 33 | +VSCode can be run in a browser in a variety of ways: |
| 34 | + |
| 35 | +-[Code Server](https://github.com/cdr/code-server) |
| 36 | +-[Codespaces](https://visualstudio.microsoft.com/services/visual-studio-codespaces/) |
| 37 | + |
| 38 | +Read the docs for info on how to pass in variables, or contact`coderoadapp@gmail.com` for a working example. |