var pjson = require('./package.json'); console.log(pjson.version);
详见:https://stackoverflow.com/questions/9153571/is-there-a-way-to-get-version-from-package-json-in-nodejs-code