How should I run a REST API with Meteor? How should I run a REST API with Meteor? express express

How should I run a REST API with Meteor?


Meteor does not yet have the built in functionality to provide a restful API.


You can build basic routing into our application using Backbone, as in the Meteor example provided here: http://meteor.com/examples/todos

You can do something like this:

var AppRouter = Backbone.Router.extend({  routes: {    "": "dashboard",    "home": "dashboard",    "profile": "profile",},profile: function () {    Session.set("current_view", "profile")    this.navigate('profile', {trigger: true});},

Also take a look at: How to expose a RESTful Web Service using Meteor


Alternatively you can serve RESTful APIs with Meteor using the meteor-collectionapi Atmosphere package. See also Is Meteor an option, if i need an additional REST API?.