mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 02:19:08 +00:00
minor fixes: npm updates, fonts, image serve fix.
This commit is contained in:
parent
c6f5b55c1c
commit
1b169fa284
8 changed files with 2663 additions and 1600 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue