From 54ac2c08112fe17cb905e330497faf65f32e745c Mon Sep 17 00:00:00 2001 From: Brian Nickel Date: Wed, 31 Jul 2013 23:07:01 -0700 Subject: [PATCH] Added docs about default values --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ecf14c..caa5525 100644 --- a/README.md +++ b/README.md @@ -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.