This answer explains how to read the package.json "version" from a npm started application. Is there an env variable in Meteor (1.3+) with this info?
Asked
Active
Viewed 720 times
1 Answers
3
Well, there is not npm_package_version environment value in process object.
But you get the value of version using following code :
var pjson = require('/package.json');
console.log(pjson.version); // This will print the version
Pankaj Jatav
- 2,144
- 2
- 12
- 19
-
Good one, Pankaj. Maybe it'd be a good idea to wrap it in a server method to avoid sharing restricted info to the client. – Adriano P Aug 03 '16 at 13:40