From 2606cf9639c43c0e1f3d2f56bc1515fc6cd53270 Mon Sep 17 00:00:00 2001 From: lixuejiang <642898959@qq.com> Date: Fri, 26 Aug 2016 11:03:30 +0800 Subject: [PATCH] add route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加路由 --- build/dev-server-express.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/dev-server-express.js b/build/dev-server-express.js index 8880ed6..09c45f4 100644 --- a/build/dev-server-express.js +++ b/build/dev-server-express.js @@ -6,6 +6,11 @@ var config = require('./webpack.dev.conf') var app = express() var compiler = webpack(config) +app.use(express.static(__dirname + '/../dist')); +app.get('/', function (req, res) { + res.sendFile(__dirname + "/../dist/index.html"); +}); + // proxy // var proxy = require('http-proxy-middleware')([ // '**',