include sample data for cookbook
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 31 Oct 2010 13:08:03 +0000 (14:08 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 31 Oct 2010 13:08:03 +0000 (14:08 +0100)
angular-server.pl

index 5ac99de..053e5a8 100755 (executable)
@@ -7,7 +7,16 @@ use Data::Dump qw(dump);
 # http://docs.getangular.com/REST.Basic
 # http://angular.getangular.com/data
 
-our $data;
+our $data = {
+       'Cookbook' => {
+               test => [
+                               { '$id' => 1, foo => 1, bar => 2, baz => 3 },
+                               { '$id' => 2, foo => 1                     },
+                               { '$id' => 3,           bar => 2           },
+                               { '$id' => 4,                     baz => 3 },
+               ],
+       }
+};
 our $id2nr;
 
 get '/' => 'index';