> For the complete documentation index, see [llms.txt](https://petercheng7788.gitbook.io/developer-note/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://petercheng7788.gitbook.io/developer-note/frontend/react/core/environment-variable.md).

# Environment Variable

## Introduction

* There are 2 types  - public & private
* There are 2 levels - static & dynamic

## Type

### Public

* Can be exposed on both client side and server side

### Private

* Can only be exposed on server side
* Suitable for variable that need to keep secret

## Level

### Static

* The variable only be appended during build time, if the variable is updated, the application is neede d to be rebuilt

### Dynamic

* The variable only be appended during run time, if the variable is updated, just restart the application is okay

## Reference

{% embed url="<https://learn.svelte.dev/tutorial/env-static-private>" %}
