-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.ts
executable file
·35 lines (32 loc) · 908 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Router from 'koa-router';
import * as Koa from 'koa';
// Router
import testRouter from '../routes/test';
import sql from '../routes/sql';
import menuRouter from '../routes/menu';
import tohomh from '../routes/tohomh123';
import manhuagui from '../routes/manhuagui';
import u17 from '../routes/u17';
import qq from '../routes/qq';
import kuaikanmanhua from '../routes/kuaikanmanhua';
const router = new Router();
router.get('/', (ctx: Koa.Context) => {
ctx.set({
'Cache-Control': 'no-cache',
});
ctx.body = {
request: 'Welcome Use Comic Hub',
};
});
// Test
router.get('/test/:id', testRouter);
// 查询 sql 数据
router.post('/sql', sql);
// 左侧菜单
router.get('/menu', menuRouter);
router.post('/manhuagui', manhuagui);
router.post('/tohomh123', tohomh);
router.post('/u17', u17);
router.post('/qq', qq);
router.post('/kuaikanmanhua', kuaikanmanhua);
export default router;