Monthly Archives: April 2011

image resize in node.js

install imagemagick by apt-get install imagemagick var im = require(‘imagemagick’); im.resize({   srcPath: __dirname + ‘/flowers.jpg’,   dstPath: __dirname + ‘/flowers-small.jpg’,   width:   ‘50%’ }, function(err, stdout, stderr){   if (err) throw err   console.log(‘resized’) }); Ref : Advertisements

Posted in Node.js | Leave a comment

making thumbnail of video using ffmpeg in node.js

the metadata uses the var exec = require(‘child_process’).exec; module.exports = {   get: function(inputfile, callback) {     try     {       exec(‘ffmpeg -i ‘ + inputfile, function(err, stdout, stderr) { to execute the ffmpeg commands. Ref : var ffmpeg = require(‘fluent-ffmpeg’); var sys … Continue reading

Posted in Node.js | Leave a comment

advantage of command line interface CLI

You can make and modify configuration settings. You can create, update, and delete a component, device in a network, or any database information You can start, stop and suspend any service in network operation. You can control a service running … Continue reading

Posted in Project Management | 1 Comment

using simpledb with node.js

var simpledb = require(‘simpledb’); var sys = require(‘sys’); var sdb      = new simpledb.SimpleDB({keyid:’key’                         ,secret:’sec key ‘}) sdb.listDomains( function( error, result, meta ) {   if( error ) {     console.log(‘listDomains failed: ‘+error.Message )   }   else {     … Continue reading

Posted in Node.js | Leave a comment

upload file to s3 cloud with knox

knox  is the latest . //you have to download the knox folder from knox git . var knox = require(‘./lib/knox’)   , sys = require(‘sys’)   , fs = require(‘fs’);   var client = knox.createClient({     key: ‘your key’   … Continue reading

Posted in Node.js | Leave a comment


Yes, this should be possible. What you need to do is create a signed policy file per-upload or per-user. That policy file, the signature, and some other data must be sent by the client program using a POST request to … Continue reading

Posted in Project Management | Leave a comment

what is bucket in s3

Amazon Simple Storage Service (AWS S3) Just like a bucket holds water, Amazon buckets are like a container for your files. You can name your buckets the way you like but it should be unique across the Amazon system. Cloud … Continue reading

Posted in Project Management | Leave a comment


mime Support for mapping between file extensions and MIME types. This module uses the latest version of the Apache “mime.types” file (maps over 620 types to 800+ extensions). It is also trivially easy to add your own types and extensions, … Continue reading

Posted in Project Management, Team Leading | Leave a comment

uploading a file in node.js by formidable

var http = require(‘http’) ,formidable = require(‘formidable’) ,fs = require(‘fs’)  , sys = require(‘sys’); http.createServer(function (req, res) {   // set up some routes   switch(req.url) {     case ‘/’:          // show the user a simple form           console.log(“[200] … Continue reading

Posted in Node.js | 4 Comments

errro handling in javascript

try { // do stuff } catch (e) { // handle exceptions }

Posted in Node.js, UI Js | Leave a comment