Initial commit

This commit is contained in:
abrendan
2023-11-30 14:15:19 +00:00
commit e4599df811
5457 changed files with 500139 additions and 0 deletions

10
node_modules/server/router/sub.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
const join = require('../src/join');
module.exports = (path, ...middle) => async ctx => {
const full = ctx.req.subdomains.reverse().join('.');
if ((typeof path === 'string' && path === full) ||
(path instanceof RegExp && path.test(full))) {
await join(middle)(ctx);
ctx.req.solved = true;
}
};