• Node.js: Base64 encoding and decoding

    How to Base64 encode and decode in Node.js Here is how you encodetext to base64 in Node.js: var b = new Buffer('JavaScript'); var s = b.toString('base64'); // SmF2YVNjcmlwdA== And here is how you dec...

  • Node.js: Generating md5, sha1, sha512, sha256 checksum hashes

    How to Generate md5, sha1, sha512, sha256 checksum hashes in Node.js Checksums in Node.js are generated using the crypto library's createHash() method. The usage format is this: crypto.createHash(alg...

  • Node.js get IP Address

    How to get IP address in Node.js Getting a user's IP address seems pretty straightforward in Node.js, right? Does it need a special page on this website? Yes it does, we'll find out why in a few seco...

  • Node.js: Browser / User-Agent detection

    How to detect browser / User-Agent in Node.js Whether you are using a bare bones Node.js HTTP server or Express, the browser user agent information can be found in the User-Agent HTTP request header.

  • Use jQuery with Node.js

    How to use jQuery with Node.js Want to summon the awesome DOM scripting powers of jQuery in Node.js? I have got great news for you - getting jQuery to work in Node.js as easy as 1, 2, 3. Follow me. F...

  • Noxde.js: Difference between spawn and exec of child_process

    What is the difference between spawn and exec methodd of child_process? The Node.js child_process module has two methods spawn() and exec(), using which we can start a child process to execute other ...