前端采用vue+webpack后端采用java全栈开发,怎么实现自动部署
1个回答
2017-11-09
展开全部
前端可以用flightplan.js 部署。。超级方便
仔细看了看题主的问题。。你是不是想用webpack-dev-server做反向代理tomcat?。。。
附上我用webpack-dev-server做反向的的代码
var config = require("./webpack.config.js");
var webpack = require("webpack")
var webpackDevServer=require("webpack-dev-server")
config.entry.unshift("webpack-dev-server/client?http://localhost:8080", "webpack/hot/dev-server");
var compiler = webpack(config);
var server = new webpackDevServer(compiler, {
contentBase: "build",
hot: true,
inline: true,
historyApiFallback: true,
proxy: {
'/*': {
target: 'loaclhost:8088/',
secure: false
},
}
});
server.listen(8080);
ps 以上代码不是 写在 webpack.config.js里的。。而是 新建server.js 开发的时候 node server.js
仔细看了看题主的问题。。你是不是想用webpack-dev-server做反向代理tomcat?。。。
附上我用webpack-dev-server做反向的的代码
var config = require("./webpack.config.js");
var webpack = require("webpack")
var webpackDevServer=require("webpack-dev-server")
config.entry.unshift("webpack-dev-server/client?http://localhost:8080", "webpack/hot/dev-server");
var compiler = webpack(config);
var server = new webpackDevServer(compiler, {
contentBase: "build",
hot: true,
inline: true,
historyApiFallback: true,
proxy: {
'/*': {
target: 'loaclhost:8088/',
secure: false
},
}
});
server.listen(8080);
ps 以上代码不是 写在 webpack.config.js里的。。而是 新建server.js 开发的时候 node server.js
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询