# Configurare l'app con il file config

> Tieni le impostazioni in un file config e leggile tramite CONF.

Framework: total5
Product: Total.js 5 (total5@0.0.19)
Language: it
Content-SHA256: e2ea527d33b29fd4c382a36da9f0de62dc8eb563f352b87b9e63ebe89a80ef67
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: total5-installed@total5@0.0.19
Review: not-recorded

Il file `config` nella radice del progetto contiene un'impostazione `key : value` per riga. In esecuzione i valori sono disponibili nell'oggetto globale `CONF`. I valori sono stringhe a meno che tu non dichiari un tipo tra parentesi dopo la chiave: `limit (number) : 10` o `debug (boolean) : true`.

```text config
name       : Forge demo
limit (number) : 10
debug (boolean) : true
```

```js controllers/settings.js
exports.install = function() {
	ROUTE('GET /settings/', settings);
};

function settings($) {
	$.json({ name: CONF.name, limit: CONF.limit, debug: CONF.debug });
}
```

In una vista puoi leggere gli stessi valori con `@{'%name'}`.
