node.js - vue-cli webpack express配置服务端路由规则
PHP中文网
PHP中文网 2017-04-17 15:44:36
0
1
495
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
左手右手慢动作

There is no problem with this configuration.

// serve webpack bundle output
app.use(devMiddleware)

// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)

app.use('/', routes);

By doing this, the above codes will be processed in order. The two middlewares devMiddleware and hotMiddleware are added by default in vue-cli, which can be adjusted and used as needed.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template