feat: init base module
This commit is contained in:
9
src/test/index.ts
Normal file
9
src/test/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { router } from '../modules/router.ts';
|
||||
import { Route } from '@abearxiong/router';
|
||||
|
||||
const getList = new Route('test', 'getList');
|
||||
getList.run = async (ctx) => {
|
||||
ctx.body = 'test';
|
||||
return ctx;
|
||||
};
|
||||
router.add(getList);
|
||||
Reference in New Issue
Block a user