Shared assets, cleanup for initial deploy
This commit is contained in:
@ -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') {
|
||||
|
Reference in New Issue
Block a user