1 Star 0 Fork 59

lie2believe/GridManager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
server.js 871 Bytes
一键复制 编辑 原始数据 按行查看 历史
写个程序换个饼 提交于 2019-03-01 11:19 . update webpack
const path = require('path');
const express = require('express');
const app = express();
const webpack = require('webpack');
const webpackConfig = require('./webpack-dev-config');
const compiler = webpack(webpackConfig);
// 配置热启动
app.use(require('webpack-dev-middleware')(compiler, {
noInfo: false,
stats: {
colors: true,
cached: false
},
publicPath: webpackConfig.output.publicPath
}));
// 配置空路径
app.use(/\/$/, function (req, res) {
res.redirect('/demo/index.html');
});
// 配置coverage路径
app.use(/\/coverage$/, function (req, res) {
res.redirect('/coverage/chart/index.html');
});
// 配置资源路径√
app.use(express.static(path.join(__dirname, 'src')));
app.use(express.static(__dirname));
app.listen(2015, function (err) {
if (err) {
console.log(err);
return;
}
console.log('started at http://localhost:2015');
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/lie2believe/GridManager.git
[email protected]:lie2believe/GridManager.git
lie2believe
GridManager
GridManager
master

搜索帮助