How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • require('amqplib/callback_api').connect(function(err, c) {
      c.createConfirmChannel(function(err, ch) {
        ch.sendToQueue('foo', new Buffer('foobar'), {}, function(err, ok) {
          if (err !== null) console.warn('Message nacked!');
          else console.log('Message acked');
        });
      });
    });
    
    Docs
  • var open = require('amqplib').connect();
    open.then(function(c) {
      c.createConfirmChannel().then(function(ch) {
        ch.sendToQueue('foo', new Buffer('foobar'), {},
          function(err, ok) {
            if (err !== null)
              console.warn('Message nacked!');
            else
              console.log('Message acked');
        });
      });
    });
    
    Docs
  • amqp.connect('amqp://localhost', {clientProperties: {connection_name: 'myFriendlyName'}});
    
    Docs
  • amqp.connect().then(function(conn) {
     // Everything ok, but ..
     throw new Error('SNAFU');
    }, function(err) {
     console.error('Connect failed: %s', err);
    }).then(null, function(err) {
      console.error('Connect succeeded, but error thrown: %s', err);
    });
    
    Docs
  • var dom = domain.create();
    dom.on('error', gracefullyRestart);
    
    dom.run(function() {
      amqp.connect(function(err, conn) {
          // ...
      });
    });
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples