grunt-mock2easy
Advanced tools
Comparing version 0.1.11 to 0.1.12
{ | ||
"name": "grunt-mock2easy", | ||
"description": "mock接口,生成md文档", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"homepage": "", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -54,4 +54,27 @@ # grunt-mock2easy | ||
## 和 grunt-contrib-connect 实现ajax请求跨域 | ||
修改 `Gruntfile.js` 中 connect的配置 | ||
```js | ||
connect: { | ||
server: { | ||
options: { | ||
middleware: function(connect) { | ||
return [ | ||
require('connect-livereload')( | ||
{port: globalSetting.liveReloadPort} | ||
), | ||
require('./database/do') //引入数据接口生成文件中的do.js脚本 | ||
]; | ||
}, | ||
}, | ||
}, | ||
}, | ||
``` | ||
联调时只需要改变 `do.js` 中的 `hostname` 和 `port` 即可, | ||
## Release History | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39850
80