Shared assets, cleanup for initial deploy

This commit is contained in:
Tom Moor
2017-10-29 15:02:24 -07:00
parent e370676b49
commit 84c82c31a9
47 changed files with 112 additions and 122 deletions

View File

@ -5,6 +5,7 @@ import httpErrors from 'http-errors';
import Koa from 'koa';
import Router from 'koa-router';
import sendfile from 'koa-sendfile';
import serve from 'koa-static';
import subdomainRedirect from './middlewares/subdomainRedirect';
import renderpage from './utils/renderpage';
@ -24,6 +25,9 @@ const renderapp = async ctx => {
}
};
// serve static assets
koa.use(serve(path.resolve(__dirname, '../public')));
router.get('/_health', ctx => (ctx.body = 'OK'));
if (process.env.NODE_ENV === 'production') {