Node.js Snippet – Checking Version in Code

Here’s the problem: How do I check the version of node from inside the running app? Fortunately, the answer is easy. Node’s global process object has a version property that contains all the info you’ll need.

console.log(process.version);

// v0.8.5

Leave a Reply

Your email address will not be published. Required fields are marked *