This commit is contained in:
DIYgod
2018-04-18 23:35:52 +08:00
parent 6c2382c4b7
commit be10125112
4 changed files with 5 additions and 45 deletions

View File

@@ -2,15 +2,12 @@ const Router = require('koa-router');
const router = new Router();
const art = require('art-template');
const path = require('path');
const gitHash = require('git-rev-sync');
router.get('/', async (ctx) => {
ctx.set({
'Content-Type': 'text/html; charset=UTF-8',
});
ctx.body = art(path.resolve(__dirname, './views/welcome.art'), {
hash: gitHash.short()
});
ctx.body = art(path.resolve(__dirname, './views/welcome.art'), {});
});
// // bilibili