List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
/** | |
* Add two string time values (HH:mm:ss) with javascript | |
* | |
* Usage: | |
* > addTimes('04:20:10', '21:15:10'); | |
* > "25:35:20" | |
* > addTimes('04:35:10', '21:35:10'); | |
* > "26:10:20" | |
* > addTimes('30:59', '17:10'); | |
* > "48:09:00" |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
db.on('error', function() { | |
return console.error.bind(console, 'connection error: '); | |
}); | |