Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to expose a RESTful Web Service using Meteor

Tags:

rest

meteor

How would you go about creating a restful web service using Meteor. I would like to create apps in Appcelerator that hook into the same backend.

Can Meteor solve this problem?

like image 565
Andrew Zielinski Avatar asked Apr 14 '12 02:04

Andrew Zielinski


People also ask

How are REST services accessed?

Step #1 – Enter the URL of the API in the textbox of the tool. Step #2 – Select the HTTP method used for this API (GET, POST, PATCH, etc). Step #3 – Enter any headers if they are required in the Headers textbox. Step #4 – Pass the request body of the API in a key-value pair.


1 Answers

I did a full write-on on this in Meteorpedia:

http://www.meteorpedia.com/read/REST_API

The post reviews all 6 options for creating REST interfaces, from highest level (e.g. smart packages that handle everything for you) to lowest level (e.g. writing your own connectHandler).

Additionally the post covers when using a REST interface is the right or wrong thing to do in Meteor, references Meteor REST testing tools, and explains common pitfalls like CORS security issues.

like image 172
gadicc Avatar answered Sep 21 '22 17:09

gadicc