Node.js自带 REPL —交互式解释器
R for Read
E for Eval
P for Print
L for Loop
基本
加载url模块
url.parse
|
|
|
|
返回值
其中
protocol:协议
slashes:暂时理解为双斜杠
host:主机
hostname:主机名(域名)
search:‘?’以及后面跟的字符串
query:search去掉问号
pathname:路径名
path:路径 + search
href:url全称
index.js
介绍基本格式
|
|
index.js(续)
文件读取
|
|
index.js(终)
模板渲染,重定向
|
|
|
|
html部分
终了.