This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// render the profile view (e.g. /views/show.ejs) | |
show: function(req, res, next) { | |
User.findOne({ username: req.param('id') }, function foundUser(err, user) { | |
if (err) return next(err); | |
if (!user) return next(); | |
Hacks.find({ owner: user.id }.sort('createdAt DESC').exec(function foundHacks(err, hacks){ | |
hackID = hacks.map(function (item){ return item.id}); | |
Comment.find().where({ postID: hackID }).exec(function(err, comments){ | |
if(err) return next(err); | |
if (!comments) return next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//send to be encoded by heywatch | |
client.Job.create({input: url, "outputs": [ | |
{ | |
"url": "s3://" + bucketName + "/" + key + ".webm", | |
"label": "webm", | |
"format": "webm", | |
"thumbnails": [{ | |
"label": "first", | |
"number": 1 | |
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//send to be encoded by zencoder | |
client.Job.create({input: url, "outputs": [ | |
{ | |
"url": "s3://" + bucketName + "/" + key + ".webm", | |
"label": "webm", | |
"format": "webm" | |
}, "thumbnails": [{ | |
"label": "first", | |
"number": 1 | |
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.Job.create({input: url, "outputs": [ | |
{ | |
"url": "s3://" + bucketName + "/" + key + ".webm", | |
"label": "webm", | |
"format": "webm" | |
}, "thumbnails": [{ | |
"label": "first", | |
"number": 1 | |
}] | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.Job.create({input: url, "outputs": [ | |
{ | |
"url": "s3://" + bucketName + "/" + key + ".webm", | |
"label": "webm", | |
"format": "webm" | |
}], "thumbnails": [ | |
{ | |
"label": "first", | |
"number": 10 | |
}], |
NewerOlder