These are chat archives for deployd/deployd

15th
Apr 2015
TKBRNS
@tokyoburns
Apr 15 2015 02:37
Can you trigger a Stripe charge from custom event logic in deployd?
Hüseyin Kozan
@huseyinkozan
Apr 15 2015 11:08
Can I connec MongoLab account from command line ? Like dpd -H host.mongolab.com -P <port> ... I couldnt find username and password parameteres.
Nicolas Ritouet
@NicolasRitouet
Apr 15 2015 12:25
Hüseyin Kozan
@huseyinkozan
Apr 15 2015 13:55
@NicolasRitouet Thank you very much. You solution is very usefull. I think I will use it.
Andrei Alecu
@andreialecu
Apr 15 2015 15:31
@NicolasRitouet @huseyinkozan one thing to note, in deployd 0.8.0+ you don't need to parse the mongodb:// connection string, you can use it directly
my start script on heroku looks like this:
// require deployd
var deployd = require('deployd');

// configure database etc. 
var server = deployd({
  port: process.env.PORT || 1337,
  env: 'production',
  db: { connectionString: process.env.MONGOHQ_URL }
});

// start the server
server.listen();

// debug
server.on('listening', function() {
  console.log("Server is listening on port: " + (process.env.PORT || 1337));
});

// Deployd requires this
server.on('error', function(err) {
  console.error(err);
  process.nextTick(function() { // Give the server a chance to return an error
    process.exit();
  });
});