added --spa to cli options

This commit is contained in:
Lloyd Brookes
2015-11-17 16:44:14 +00:00
parent e416a29d30
commit c6f6fcdcc1
4 changed files with 11 additions and 4 deletions

View File

@ -130,7 +130,7 @@ function localWebServer (options) {
if (options.spa) {
const send = require('koa-send')
app.use(_.all('*', function * () {
yield send(this, options.spa, { root: options.static.root || process.cwd() })
yield send(this, options.spa, { root: path.resolve(options.static.root) || process.cwd() })
}))
}
return app