y-server
让启动Server更简单
安装
全局安装
npm install -g y-server
局部安装
npm install --save-dev y-server
使用
命令行用法
y-server [--config other-dir/y-server.config.js]
JS用法
const yServer = require; // 普通模式yServer; // 热启动模式yServer.run;
配置
port
server 端口号watch
监听文件,支持字符串或者数据,支持glob语法plugins
插件集合,每一个插件是一个接收 express 实例的方法,例如:y-server-cors