github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/docs/appfile/syntax.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Syntax - Appfile" 4 sidebar_current: "docs-appfile-syntax" 5 description: |- 6 The syntax of Appfiles is HCL. 7 --- 8 9 # Syntax 10 11 The syntax of Appfiles is [HCL](https://github.com/hashicorp/hcl). 12 13 We show what this looks like below as well as a basic syntax guide. The 14 actual meaning of the various sections of the Appfile below are documented 15 in more specific sections that can be found by navigating to the links to the 16 left. 17 18 ## HCL 19 20 Here is an example of an Appfile: 21 22 ``` 23 # Application stanza 24 application { 25 name = "otto" 26 type = "go" 27 28 dependency { source = "github.com/hashicorp/otto/examples/mongodb" } 29 } 30 31 /* 32 Let's disable this for now 33 customization { 34 go_version = "1.4.2" 35 } 36 */ 37 ``` 38 39 Basic bullet point reference: 40 41 * Single line comments start with `#` 42 43 * Multi-line comments are wrapped with `/*` and `*/` 44 45 * Values are assigned with the syntax of `key = value` (whitespace 46 doesn't matter). The value can be any primitive: a string, 47 number, or boolean. 48 49 * Strings are in double-quotes. 50 51 * Numbers are assumed to be base 10. If you prefix a number with 52 `0x`, it is treated as a hexadecimal number. 53 54 * Boolean values: `true`, `false`. 55 56 * Lists of primitive types can be made by wrapping it in `[]`. 57 Example: `["foo", "bar", 42]`. 58 59 * Maps can be made with the `{}` syntax: 60 `{ foo = "bar" }`. 61