yel v0.4.2
yel
从当前路径启动一个 WEB 服务器。
安装
$ npm install -g yel
快速启动
$ cd my-project-path
$ yel start
命令
start [port]
从当前路径启动 WEB 服务器并监听 port
端口。默认监听端口 80
。
例如, 启动 WEB 服务器并监听 8080
端口:
$ yel start 8080
restart
重启当前路径下的 WEB 服务器。
stop
停止当前路径下的 WEB 服务器。
config
配置文件
使用 config
配置文件启动 WEB 服务器,config
配置文件必须在 WEB 服务器的根路径下。
workers
服务器进程数,默认2
log
日志记录文件的路径,默认'#<date>.log'
host
服务器主机地址,默认'0.0.0.0'
port
服务器端口,默认80
cache
静态文件缓存选项:maxAge
缓存最大时间期限,单位ms
,默认0
(无限期)cacheControl
缓存控制字符串,默认'public,max-age=#<maxAge>'
md5Encoding
文件 MD5 编码:'hex'
或'base64'
,默认'hex'
ignores
忽略文件列表,默认['node_modules', 'plugins', 'tmp', '*.log', 'config']
alias
路径别名表plugins
使用插件列表
关于插件
详细查看“关于插件”。
(The MIT License)
Copyright (c) 2015-2015 Kan Kung-Yip <gon@gyeq.in>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago