Currently, I am serving an HTML file and it works fine.
(I am using koa-mount
and koa-static
to serve an index file under the docs
directory.)
app.use(mount('/docs', serve('docs')))
How can I do a conditional router in a different environment properly?
The following approach works but looks weird
// if not production
process.env !== 'production' && app.use(mount('/docs', serve('docs')))