MCPcopy Create free account
hub / github.com/coderwhy/coderhub / useRoutes

Function useRoutes

src/router/index.js:4–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4const useRoutes = function() {
5 fs.readdirSync(__dirname).forEach(file => {
6 if (file === 'index.js') return;
7 const router = require(`./${file}`);
8 this.use(router.routes());
9 this.use(router.allowedMethods());
10 })
11}
12
13module.exports = useRoutes;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected