Is meteor intended to provide REST API for mobile deveopment?


#1

People say that meteor is a full-stack framework which can be used to easily build a website. However, I also want to build IOS and Android apps. On StackOverflow there are answers about how to provide REST API in meteor. My concerns are that:

  1. there’s no official documentation about REST API on meteor website, so is the StackOverflow solution a hacky solution or not?
  2. is the REST API intended by meteor?

#2

Right now, there is no “official” way to have a REST API for your app, but that’s not really a problem, I think!

Meteor cordova integration

If you want to build an HTML mobile app, you can use the meteor run ios feature to bundle your app as a native iOS app.

DDP library for iOS

There’s a great library for iOS that lets you connect to a Meteor server using DDP, the native protocol: https://github.com/martijnwalraven/meteor-ios

There are a lot of other libraries, as noted in my Quora answer here: https://www.quora.com/How-do-I-connect-a-Meteor-app-to-a-non-Meteor-app-via-WebSocket

Great packages for REST API

If, after checking out the above options, you still think a REST API is the best option, try out one of the packages below, it’s really quite easy!

  1. Restivus (RESTful style): https://atmospherejs.com/nimble/restivus
  2. simple:rest (directly reproduces your methods and publications): https://atmospherejs.com/simple/rest

“Official” packages

There’s no way core Meteor will ever contain everything you need to do everything you ever imagine. At some point, you will need to use some packages from Atmosphere, or some code you found on Stack Overflow. There won’t always be an “intended” way for everything, so you’ll need to figure out some things on your own.