2016-09-19 4 views
0

私は、Webアプリケーションを使って作業を管理しています。 これは私が使用しているpackage.jsonファイルです。今私は、このアプリケーションのための急行とmongodbのスキーマを含める必要があります。モデルとdbスキーマのためのexpressとMongoの追加

npm install expressとnpm install mongooseを使用すると、すべての依存関係が自動的にインストールされるか、個々のコマンドを使用する必要がありますか?

お手伝いします。ありがとう。

{ 
    "name": "square", 
    "version": "3.1.0", 
    "devDependencies": { 
    "connect-livereload": "~0.5.2", 
    "grunt": "~0.4.5", 
    "grunt-autoprefixer": "~3.0.0", 
    "grunt-concurrent": "~2.1.0", 
    "grunt-contrib-clean": "~0.7.0", 
    "grunt-contrib-coffee": "~0.13.0", 
    "grunt-contrib-compass": "~1.0.0", 
    "grunt-contrib-concat": "~0.5.0", 
    "grunt-contrib-connect": "^0.11.2", 
    "grunt-contrib-copy": "~0.8.0", 
    "grunt-contrib-cssmin": "~0.14.0", 
    "grunt-contrib-htmlmin": "~0.6.0", 
    "grunt-contrib-jade": "~0.15.0", 
    "grunt-contrib-jshint": "~0.11.0", 
    "grunt-contrib-less": "~1.1.0", 
    "grunt-contrib-uglify": "~0.11.0", 
    "grunt-contrib-watch": "~0.6.1", 
    "grunt-injector": "^0.6.1", 
    "grunt-open": "~0.2.3", 
    "grunt-usemin": "~3.1.0", 
    "jshint-stylish": "^2.1.0", 
    "load-grunt-tasks": "~3.4.0", 
    "time-grunt": "~1.3.0", 
    "serve-static": "^1.10.0", 
    "http-errors": "^1.3.1", 
    "debug": "^2.2.0", 
    "depd": "^1.1.0", 
    "destroy": "^1.0.3", 
    "range-parser": "^1.0.3", 
    "mime": "^1.3.4", 
    "fresh": "^0.3.0", 
    "etag": "^1.7.0", 
    "ms": "^0.7.1", 
    "on-finished": "^2.3.0", 
    "statuses": "^1.2.1"  
    }, 
    "engines": { 
    "node": ">=0.10.0" 
    } 
} 

答えて

0

あなたはpackage.jsonファイルであなたのdevDepenciesリストに保存されます

npm install express --save-dev 
npm install mongoose --save-dev 

これを使用することができます。明示または必要な依存関係は、それぞれをインストールするときに自動的にインストールされます。コマンド以下

0

使用:

npm install express --save 
npm install mongoose --save 

これはpackage.jsonするために、すべての依存関係をインストールし、あなたが他のシステムにインストールしたい場合は、これが言及したすべての依存関係をインストールします

npm install 

を使用することができますin package.json。

関連する問題