node.js在windows环境安装

一.安装node.js 1.去官网下载安装包,安装; 2.Windows+R运行cmd输入 node -v和npm -v会出现版本信息,表示安装成功; 二.配置国内npm下载源(三种方式选其中一种) 方法一:通过config命令

npm config set registry https://registry.npm.taobao.org

npm info underscore (如果上面配置正确这个命令会有字符串response)

方法二:命令行指定

npm –registry https://registry.npm.taobao.org info underscore

方法三:编辑 ~/.npmrc 加入下面内容(node安装目录node_modules/npm文件夹下)

registry = https://registry.npm.taobao.org

三.下载项目 svn下载项目地址: https://svn.******.cn/svn/projects/*****/code/trunk/***** 四. 安装依赖 1.找到自己项目下载到的本地路径,输入npm i;安装依赖 2.输入npm run dev;运行脚本dev(配置写在package.json中) 3.通过http://localhost:8080访问项目,端口在config文件夹下index.js文件中配置的