/account/login 요청을 받는다 칠때
/* index.js */
router.use('/account/login', AccountLogin.routes());
/* AccountLogin.js */
const api = new Router;
api.post('/', async (ctx, next) => {
// stuffs
});
module.exports = api;
이렇게 하는게 나을까
아님
/* index.js */
router.use('/', AccountLogin.routes());
/* AccountLogin.js */
const api = new Router;
api.post('/account/login', async (ctx, next) => {
// stuffs
});
module.exports = api;
어떤게 더 알아보기 쉽고 유지보수가 편할까
어렵네
댓글 0