velocity:node-soft-mirror

v0.3.1Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Node Soft Mirror

For use by Velocity framework authors. This package creates a mirror using a node form from within the running meteor process and runs .meteor/local/build/main.js. This approach has an extremely fast startup time.

The node process uses the same database as the parent meteor process but under a different schema.

##Usage Reference this package in your frameworks package.js and then use something like this on the server:

1 Meteor.call('velocity/mirrors/request', {
2  framework: 'myFramework'
3});
4
5VelocityMirrors.find({framework: 'myFramework', state: 'ready'}).observe({
6  added: watch,
7  changed: watch
8});
9
10var watch = function (mirror) {
11  VelocityTestFiles.find({targetFramework: 'myFramework'}).observe({
12    added: _doSomething,
13    removed: _doSomething,
14    changed: _doSomething
15  });
16};

##Caveats This mirror currently has no way of running files within the /tests directory.

Any frameworks that require test files to be run within the mirror, the current workaround is to symlink the /tests directory to something like /testsTemp so that meteor will watch the files under that directory.