升级依赖项

This commit is contained in:
2019-04-07 21:55:07 +08:00
parent 6f102bcf05
commit ab8238ea18
7 changed files with 1304 additions and 1213 deletions

View File

@ -1,7 +1,7 @@
module.exports = {
app: {
port: 3000, // 监听的端口
devHost: 'localhost', // 开发环境下打开的地址监听了0.0.0.0但是不是所有设备都支持访问这个地址用127.0.0.1或localhost代替
devHost: '127.0.0.1', // 开发环境下打开的地址监听了0.0.0.0但是不是所有设备都支持访问这个地址用127.0.0.1或localhost代替
open: true // 是否打开浏览器
}
}

View File

@ -15,7 +15,7 @@ module.exports = app => {
return new Promise((resolve, reject) => {
const createRenderer = (bundle, options) => {
return createBundleRenderer(bundle, Object.assign(options, {
cache: LRU({
cache: new LRU({
max: 1000,
maxAge: 1000 * 60 * 15
}),
@ -81,6 +81,7 @@ module.exports = app => {
html = '404 | Not Found'
} else {
status = 500
// console.log(e)
console.log(chalk.red('\nError: '), e.message)
html = '500 | Internal Server Error'
}