环境
node repl开发
- dos命令
tasklist
查看进程
taskkill /f /mi chrome.exe
关闭进程
netstat -ano | find "445"
查看计算机开的指定端口
rmdir
删除指定文件夹
nslookup
查询DNS - repl主要用来执行js脚本。
node sublime开发
- 工具->编译系统->编译新系统->node.sublime-build
{
"cmd":["node","$file"],
"selector":"source.js"
}
- 设置关闭结果Panel
[
{ "keys": ["ctrl+enter"], "command": "hide_panel"}
]
- sublime路径追踪
使用插件Terminal,默认快捷方式ctrl+shift+t
,可以在包安装目录下面修改快捷方式。
npm包管理器
npm list
列出所有已经安装的模块
npm install
mysql 安装mysql模块
npm uninstall mysql
卸载mysql模块
npm root
显示本地node_modules目录位置,参数-g,显示全局node_modules位置。
npm update mysql
升级mysql模块
Node常用库
request
Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
fs-readfile-promise
Promisified version of [fs.readFile
].
node-fetch
A light-weight module that brings window.fetch to Node.js.
thunkify
Turn a regular node function into one which returns a thunk, useful for generator-based flow control such as co.
superagent
Ajax with less suck - (and node.js HTTP client to match)