0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00
logto/packages/core/src/init/router.ts

14 lines
307 B
TypeScript
Raw Normal View History

2021-06-27 20:44:05 +08:00
import Koa from 'koa';
import Router from 'koa-router';
import { signInRoute } from '../consts';
2021-06-27 20:44:05 +08:00
const router = new Router();
router.get(signInRoute, (ctx) => {
ctx.body = 'Signing in';
2021-06-27 20:44:05 +08:00
});
export default function initRouter(app: Koa): void {
app.use(router.routes()).use(router.allowedMethods());
}