# Share settings with ENV and the [key] syntax

> Register values with ENV() and use them in URLs and component configuration with the [key] placeholder.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: bc463ba39c988765498f2434cfafd091e63bc7d3b4acc44df26da46b70c5b105
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: jcomponent20@3fedd009a277f50fddc608b97afbec553b67c51b
Review: not-recorded

`ENV(name, value)` registers a value for the whole page and `ENV(name)` reads it. Wherever jComponent accepts a text that may contain `[name]` (for example the URL of `AJAX()` and `IMPORT()`), the placeholder is replaced with the value, so you set the address of your API in one place. `'[name]'.env()` does the same replacement on any string.

```html public/index.html
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>jComponent</title>
	<link rel="stylesheet" href="//cdn.componentator.com/spa.min@20.css" />
	<script src="//cdn.componentator.com/spa.min@20.js"></script>
</head>
<body>
	<p class="out"></p>

	<script>

		ENV('api', '/api/v1');
		ENV('version', '20');

		$('.out').text('[api]/users?v=[version]'.env());

	</script>

</body>
</html>
```
