whistle.xxtpl
v1.0.1
Published
Respond with json/jsonp according to the callback parameter
Readme
whistle.xxtpl
自适应callback返回json/jsonp
匹配方式:
pattern xxtpl://{res.json}其中,
pattern表示匹配请求url的表达式,可以为域名(如:www.test.com xxtpl://{res.json})、路径,通配符、正则表达式等,具体参见:whistle的匹配模式。
安装
首先需要安装最新版whistle,如果你的机器已经安装了whistle,请确保whistle为最新版本:
安装xxtpl插件,执行npm全局安装即可:
npm i -g whistle.xxtpl如果是Linux或Mac,可能需要用
sudo npm i -g whistle.xxtpl,推荐使用cnpm或自己公司提供的npm镜像安装
