Using classic node.js ORM in Meteor

Can I use, for example, Sequelize, Bookshelf or Waterline inside a meteor?

I want to use Meteor as a classic backend, so just use Restivus to create my Rest API and you need to communicate with some external databases. It does not have to be reactive or be a “live request."

+4
source share
1 answer

Basically, you could, but since Meteor uses Fibers, you have to wrap up calls. I had to transfer some data sqlite3in the past and use Fiber to handle processed db calls. There was something like this

var Fiber = Npm.require('fibers');

db.method('query', function(){
  Fiber(function(){
    // more queries
  }).run();
});

Or around the same idea, I would have to check the code to be sure, but it was around these lines.

0
source

All Articles