expose report.html and stats.json

This commit is contained in:
Nolan Lawson 2018-03-25 13:47:01 -07:00
parent 7ce9a39119
commit cdd7469bd3
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,8 @@
const app = require('express')() const express = require('express')
const compression = require('compression') const compression = require('compression')
const sapper = require('sapper') const sapper = require('sapper')
const serveStatic = require('serve-static') const serveStatic = require('serve-static')
const app = express()
const { PORT = 4002 } = process.env const { PORT = 4002 } = process.env
@ -20,6 +21,9 @@ app.use(serveStatic('assets', {
} }
})) }))
app.use('/report.html', express.static('.sapper/client/report.html'))
app.use('/stats.json', express.static('.sapper/client/stats.json'))
app.use(sapper()) app.use(sapper())
app.listen(PORT, () => { app.listen(PORT, () => {