Skip to content

Commit

Permalink
Added docs about default values
Browse files Browse the repository at this point in the history
  • Loading branch information
bnickel committed Aug 1, 2013
1 parent 37aa0cd commit 54ac2c0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,17 @@ In this case, AMYServer will ignore requests that don't have the correct usernam

Here, AMYServer injects a custom header with the token.

Example 3: Custom Behavior
Example 3: Default Mustache values
----------------------------------

Rather than providing every value every time you render a template, AMYServer lets your provide a JSON file with default values. The name of this file is the same as the tail file with an additional extension `.defaults.json`.

**successful-login.tail.defaults.json**

{ "message": "Good morning, sir", "token": "1234" }


Example 4: Custom Behavior
--------------------------

AMYServer is not limited to just Mocktails. It can be use for serving images, 1000 bytes at a time, with 5 seconds between bytes.
Expand Down

0 comments on commit 54ac2c0

Please sign in to comment.