NPM的全称是Node Package Manager,可以通过npm命令对node.js安装扩展模块,已完成更加复杂的开发,类似于centos下的yum命令

用法如下: npm install mysql (扩展mysql为例子)  

npm http GET https://registry.npmjs.org/mysql
npm http 304 https://registry.npmjs.org/mysql
npm http GET https://registry.npmjs.org/require-all/0.0.3
npm http GET https://registry.npmjs.org/bignumber.js/1.0.1
npm http 304 https://registry.npmjs.org/require-all/0.0.3
npm http 304 https://registry.npmjs.org/bignumber.js/1.0.1
mysql@2.0.0-alpha8 node_modules\mysql
├── require-all@0.0.3
└── bignumber.js@1.0.1

 表示mysql的模块已经下载好了,我的机器上默认的路径为 C:\Users\lile\node_modules\mysql ,将这个文件夹复制到webstorm 创建的node_modules下,就可以用这个扩展模块操作mysql数据库了

node.js之npm命令安装扩展模块

   

       

相关文章:

  • 2021-10-10
  • 2021-09-13
  • 2021-12-14
  • 2022-01-08
  • 2021-11-17
  • 2022-02-08
  • 2021-09-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-09-13
相关资源
相似解决方案