• Global variables in Node.js

    How to create global variables in Node.js So you are working with a set of Node modules, maybe a framework like Express.js, and suddenly feel the need to make some variables global. How do you make v...

  • Nodejs Error: Could not autodetect OpenSSL support

    OpenSSL development packages not installed So you are ready to install Node on your Ubuntu box and run ./configure, to which you are greeted by a nasty looking error: Could not autodetect OpenSSL sup...

  • Node.js UDP server and client example

    How create UDP server and client on Node.js Here is a quick tutorial on setting up a UDP server and client in Node.js. For all things UDP in Node.js, you will need to use the dgram library, so read i...

  • Node.js EventEmitter Tutorial with Examples

    Heard about Node.js' EventEmitter class? Maybe you know that most of the built-in Node libraries use it? Maybe you were always curious about EventEmitter, but had no one to explain it to you? In this...

  • 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...