"Many of us are using promises without really understanding them."
Article: we-have-a-problem-with-promises
Two-way binding just means that:
Backbone doesn't have a "baked-in" implementation of 2 option (although you can certainly do it using event listeners)
In Backbone, we can easily achieve option 1 by binding a view's "render" method to its model's "change" event. To achieve option 2, you need to also add a change listener to the input element, and call model.set in the handler.
example code:
if (os.hostname() === 'host_name') {
const memwatch = require('memwatch-next');
const heapdump = require('heapdump');
console.log('_SYSTEM_ activating:[memwatch]');
console.log('_SYSTEM_ activating:[heapdump]');
memwatch.on('leak', function(info) {
let heapsnapshot = '/path/leak_' + Date.now() + '.heapsnapshot';
console.log('MEMWATCH [%s]'.bgBlue, JSON.stringify(info));
console.log('HEAPDUMP [%s]'.bgBlue, heapsnapshot);
heapdump.writeSnapshot(heapsnapshot);
});
}