//引入插件var gulp = require('gulp');// var Proxy = require('gulp-connect-proxy');var connect = require('gulp-connect');var proxy = require('http-proxy-middleware');//使用connect启动一个Web服务器gulp.task('connect', function () {
connect.server({
root: './',
livereload: true,
port: 8010,
middleware: function (connect, opt) {return [
proxy('/fs', {
target: 'http://172.16.2.52:8080',
changeOrigin:true}),
proxy('/product', {
target: 'http://172.16.1.60:8080',
changeOrigin:true}),
proxy('/bpauth', {
target: 'http://192.168.24.77:8080',
changeOrigin:true})
]
}
});
});
gulp.task('watch', function () {
gulp.watch(['./*.html'], ['html']);
});
gulp.task('html', function () {
gulp.src('./*.html')
.pipe(connect.reload());
});//运行Gulp时,默认的Taskgulp.task('default', ['connect', 'watch']);
PHP经典实例(第2版)能够为您节省宝贵的Web开发时间。有了这些针对真实问题的解决方案放在手边,大多数编程难题都会迎刃而解。《PHP经典实例(第2版)》将PHP的特性与经典实例丛书的独特形式组合到一起,足以帮您成功地构建跨浏览器的Web应用程序。在这个修订版中,您可以更加方便地找到各种编程问题的解决方案,《PHP经典实例(第2版)》中内容涵盖了:表单处理;Session管理;数据库交互;使用We









