npm cache server
来源:互联网 发布:软件质量控制 编辑:程序博客网 时间:2024/05/21 17:26
npm_lazy快速搭建一个本地的npm cache 服务。
首先服务器要安装好nodejs和npm
#node -v
v0.10.28
#npm -v
1.4.9
安装npm_lazy:
#npm install -g npm_lazy
因为这里搭建的npm cache不只是为了给本机自己使用,主要是给内网的服务器使用,所以需要修改配置文件:
#cd /usr/local/node1028/lib/node_modules/npm_lazy
#vim config.js
// external url to npm_lazy, no trailing / externalUrl: 'http://10.10.11.30:8080', // registry url with trailing / remoteUrl: 'https://registry.npmjs.org/', // bind port and host port: 8080, host: '10.10.11.30',<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">你只需要把ip地址改成自己服务器内网IP地址即可,注意externalurl的端口要和port端口保持一致。</span>
执行命令启动npm_lazy
#npm_lazy &
客户端使用方法:
将镜像地址改为npm_lazy服务器的地址:
#npm config set registry http://10.10.11.30:8080
查看状态:
#cat /root/.npmrc
registry = http://10.10.11.30:8080
然后正常使用npm安装即可。
0 0
- npm cache server
- npm cache
- Cache Server (Team License)
- 更改npm全局模块和cache默认安装位置
- 更改npm全局模块和cache默认安装位置
- Cache Server 内存数据库说明
- Unity Cache Server的使用
- Unity Cache Server 服务安装
- npm
- npm
- npm
- npm
- npm
- npm
- npm
- npm
- npm
- npm
- 拦截数据库增删改操作
- django添加ldap认证
- 黑马程序员——Java基础---Java语言基础(二)
- 移动webAPP前端开发代码演示和技巧汇总
- WinXP 比 Win2008R2 更高效? 我反正信了.
- npm cache server
- js有关元素内容操作小结
- 来自知乎-Web 建站技术中,HTML、HTML5、XHTML、CSS、SQL、JavaScript、PHP、ASP.NET、Web Services 是什么?
- 【牛刀小试2】密码保护
- c/c++使用VS2013连接MySQL与ubuntu下c链接mysql
- Show image in matplotlib
- hive中的Lateral View
- Linux的文件类型和权限操作
- 藏书阁(非技术流书籍)