Book Image

Meteor Cookbook

By : Isaac Strack
Book Image

Meteor Cookbook

By: Isaac Strack

Overview of this book

Table of Contents (19 chapters)
Meteor Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating RESTful web services


Alas, alas, the entire development world hasn't caught on to how amazing the DDP protocol is (yet!). Data-over-the-wire is an amazing concept, and we believe that it (or something like it) is the future of how applications will communicate. In the meantime, we have some very useful and well-established protocols that, if implemented in our applications, increase the reach and accessibility of our apps for other platforms.

The granddaddy of all of these protocols is REST. REST is mature, well-defined, and has been implemented in nearly every programming language imaginable. It wouldn't surprise us to discover that, if/when we contact an alien race, the first signal will be a POST request. Given its current status (and our most likely option for peaceful interstellar negotiations), we will want to add REST capabilities to some of our applications. This recipe will walk you through implementing a server-side REST implementation using Iron Router.

Getting ready

Since...