diff --git a/config/config.js b/config/config.js index df8abd6d20..c129edfa3c 100644 --- a/config/config.js +++ b/config/config.js @@ -161,6 +161,10 @@ var initGlobalConfig = function () { // Merge config files var config = _.merge(defaultConfig, environmentConfig); + // read package.json for MEAN.JS project information + var pkg = require(path.resolve('./package.json')); + config.meanjs = pkg; + // We only extend the config object with the local.js custom/local environment if we are on // production or development environment. If test environment is used we don't merge it with local.js // to avoid running test suites on a prod/dev environment (which delete records and make modifications) diff --git a/config/lib/app.js b/config/lib/app.js index 76c0bf779c..17dd9076c5 100644 --- a/config/lib/app.js +++ b/config/lib/app.js @@ -46,6 +46,9 @@ module.exports.start = function start(callback) { if (process.env.NODE_ENV === 'secure') { console.log(chalk.green('HTTPs:\t\t\t\ton')); } + console.log(chalk.green('App version:\t\t\t' + config.meanjs.version)); + if (config.meanjs['meanjs-version']) + console.log(chalk.green('MEAN.JS version:\t\t\t' + config.meanjs['meanjs-version'])); console.log('--'); if (callback) callback(app, db, config); diff --git a/package.json b/package.json index b8e34d0d36..967ad70f5a 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "meanjs", "description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.", "version": "0.4.1", + "meanjs-version": "0.4.1", "private": false, "author": "https://github.com/meanjs/mean/graphs/contributors", "license": "MIT",