minor fixes: npm updates, fonts, image serve fix.

This commit is contained in:
41666 2019-03-20 03:06:20 -05:00
parent c6f5b55c1c
commit 1b169fa284
8 changed files with 2663 additions and 1600 deletions

View file

@ -47,7 +47,7 @@ async function start () {
// SPA + Static
if (process.env.NODE_ENV === 'production') {
const pub = path.join(__dirname, 'public')
const pub = path.resolve(path.join(__dirname, 'public'))
log.info('public path', pub)
const staticFiles = require('koa-static')
@ -69,7 +69,7 @@ async function start () {
try {
fs.statSync(chkPath)
log.info('sync pass')
ctx.body = fs.readFileSync(chkPath, { encoding: 'utf-8' })
ctx.body = fs.readFileSync(chkPath)
ctx.type = path.extname(ctx.path)
log.info('body sent')
ctx.status = 200