0

I'm writing an app where I'm planning on using meteor as my frontend and I already have my backend api written in sailsjs app.

Is there a way to break the dependency of saving models in meteor to mongodb? Can I do create/update/destroy models using an JSON api?

ed1t
  • 8,719
  • 17
  • 67
  • 110

1 Answers1

1

I am no expert on Meteor.js but I am an addict. I believe it can be achieved by using a Client only Meteor.Collection http://docs.meteor.com/#meteor_collection Here are some similar questions on stackoverflow: Client-side-only reactivity with Meteor? How to sort a client-side-only (local) Meteor Collection

and then using Meteor Methods: http://docs.meteor.com/#methods_header https://stackoverflow.com/a/13145432/1147242

to do all the CRUD to your sailsjs API.

Here is a video from Eventedmind on Local Collections : https://eventedmind.com/classes/how-to/meteor-how-to-publish-to-a-client-only-collection And on Meteor.Methods: https://eventedmind.com/feed/meteor-methods

Hopefully it will help.

Community
  • 1
  • 1
praneybehl
  • 3,801
  • 6
  • 28
  • 45