URL模块
- url.parse
讲一个URL解析成URL对象

- url.parse解析后面可以跟参数true

- url.resolve
将两段字符串拼接成url

- querystring.stringify 将对象拼接成字符串

- querystring.parse 拼接的字符串解析成URL对象

- querystring.escape 转义字符串
> querystring.escape('<项羽>')
'%3C%E9%A1%B9%E7%BE%BD%3E'
- querystring.unescape 反转义
> querystring.unescape('%3C%E9%A1%B9%E7%BE%BD%3E')
'<项羽>'
node.js 一个小网站开发完成之后,可以自动生成配置文件
bower init 生成bower.json文件
npm init 生成package.json文件
网友评论